Buscar este blog

sábado, 22 de febrero de 2014

Aplicacion para mostrar sus notas, clases, nivel académico y ver a sus asesores. VB.NET 2012 - 2013



Basically, my project is targeting college students, which the application would help them to look at their grades, classes, academic standing, and if they have hold or need to see their advisers. The application will let the students to use their students ID's and a password to enter. For example, students of University of Idaho need to go to the University website first, then go the web. So, my Idea is making it easier to them and create this application with most important data that the students are looking for. 

The application will has two forms. First form is the login form, when the student enter the student's ID and the password. The second form is displaying the name of the student, the GPA, a message if he needs to see his adviser or has hold and a list of classes.

  
Segundo formulario.




Public Class Student
    Private mNombres As String
    Private mAdviser As String
    Private mGrade As String
    Private mCourse1 As String
    Private mNota1 As Double
    Private mCourse2 As String
    Private mNota2 As Double
    Private mCourse3 As String
    Private mNota3 As Double
    Public Property Nombres() As String
        Get
            Return Me.mNombres
        End Get
        Set(ByVal value As String)
            Me.mNombres = value
        End Set
    End Property
    Public Property Grade() As String
        Get
            Return Me.mGrade
        End Get
        Set(ByVal value As String)
            Me.mGrade = value
        End Set
    End Property
    Public Property Adviser() As String
        Get
            Return Me.mAdviser
        End Get
        Set(ByVal value As String)
            Me.mAdviser = value
        End Set
    End Property
    Public Property Course1() As String
        Get
            Return Me.mCourse1
        End Get
        Set(ByVal value As String)
            Me.mCourse1 = value
        End Set
    End Property
    Public Property Course2() As String
        Get
            Return Me.mCourse2
        End Get
        Set(ByVal value As String)
            Me.mCourse2 = value
        End Set
    End Property
    Public Property Course3() As String
        Get
            Return Me.mCourse3
        End Get
        Set(ByVal value As String)
            Me.mCourse3 = value
        End Set
    End Property
    Public Property Nota1() As Double
        Get
            Return Me.mNota1
        End Get
        Set(ByVal value As Double)
            Me.mNota1 = value
        End Set
    End Property
    Public Property Nota2() As Double
        Get
            Return Me.mNota2
        End Get
        Set(ByVal value As Double)
            Me.mNota2 = value
        End Set
    End Property
    Public Property Nota3() As Double
        Get
            Return Me.mNota3
        End Get
        Set(ByVal value As Double)
            Me.mNota3 = value
        End Set
    End Property

End Class

Usando un modulo para crear los arrays.
Module CodeModule
    Public Students(100) As String
    Public Cursos(100) As Double
    Public Teachers(100) As String
    Public Evaluaciones(100) As Double
    Public Datos As New List(Of Student)
    Public Clave As String
    Public Usuario As String
End Module
Codigo del formulario Login.
 Private Sub btn_Reg_Click(sender As System.Object, e As System.EventArgs) Handles btn_Reg.Click
        If TextBox1.Text.Trim.Length = 0 Then
            MessageBox.Show("Enter a User ", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            TextBox1.Focus()
        ElseIf TextBox2.Text.Trim.Length = 0 Then
            MessageBox.Show("Enter a password ", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            TextBox2.Focus()
        Else
            Usuario = TextBox1.Text
            Clave = TextBox2.Text
            MessageBox.Show("User created", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            tabControl1.SelectedIndex = 0
            TextBox1.Clear()
            TextBox2.Clear()
        End If
    End Sub

    Private Sub btn_canl_reg_Click(sender As System.Object, e As System.EventArgs) Handles btn_canl_reg.Click
        tabControl1.SelectedIndex = 0
    End Sub

    Private Sub btn_Login_Click(sender As System.Object, e As System.EventArgs) Handles btn_Login.Click

        If Username.Text.Trim = Usuario.Trim And Password.Text.Trim = Clave.Trim Then
            Me.Hide()
            frmrMain.StartPosition = FormStartPosition.CenterScreen
            frmrMain.Show()
        Else
            MessageBox.Show("Error in the user or password", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        End If
    End Sub

    Private Sub btn_cancel_Click(sender As System.Object, e As System.EventArgs) Handles btn_cancel.Click
        Me.Close()
    End Sub

Formulario frmMain
 Private Sub btn_Exit_Click(sender As System.Object, e As System.EventArgs)
        Me.Close()
    End Sub

    Private Sub frmrMain_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        If MessageBox.Show("Are you sure you want to quit", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = 6 Then
            End
        Else
            My.Forms.frmLogin.Show()
            e.Cancel = False
        End If
    End Sub

    Private Sub btn_Student_Click(sender As System.Object, e As System.EventArgs) Handles btn_Student.Click
        Dim Nota1 As Double
        Dim Nota2 As Double
        Dim Nota3 As Double
        Dim Name As String = InputBox("Enter name student:")
        Dim NameAdviser As String = InputBox("Enter name of Adviser:")
        Dim NumGrade As String = InputBox("Enter grade:")
        Dim NameCourse1 As String = InputBox("Enter name course 1:")
        Do
            Nota1 = InputBox("Enter evaluation 1:")
            If Val(Nota1) >= 0 And Val(Nota1 <= 20) Then Exit Do
        Loop

        Dim NameCourse2 As String = InputBox("Enter name course 2:")
        Do
            Nota2 = InputBox("Enter evaluation 2:")
            If Val(Nota2) >= 0 And Val(Nota2 <= 20) Then Exit Do
        Loop
        Dim NameCourse3 As String = InputBox("Enter name course 3:")
        Do
            Nota3 = InputBox("Enter evaluation 3:")
            If Val(Nota3) >= 0 And Val(Nota3 <= 20) Then Exit Do
        Loop

        Dim S As New Student
        S.Nombres = Name
        S.Adviser = NameAdviser
        S.Grade = NumGrade
        S.Nota1 = Nota1
        S.Nota2 = Nota2
        S.Nota3 = Nota3
        S.Course1 = NameCourse1
        S.Course2 = NameCourse2
        S.Course3 = NameCourse3
        Datos.Add(S)
        MessageBox.Show("Recorded information", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning)
    End Sub

    Private Sub btn_Stu_Rec_Click(sender As System.Object, e As System.EventArgs) Handles btn_Stu_Rec.Click
        Me.DataGridView1.DataSource = Nothing
        If Datos.Count > 0 Then
            DataGridView1.AutoGenerateColumns = False
            DataGridView1.DataSource = Datos

            Dim C As Integer = Datos.Count - 1

            Dim MenNota As Double = Datos.ToList.Item(C).Nota1
            Dim Curso As String = Datos.ToList.Item(C).Course1
            If MenNota > Datos.ToList.Item(C).Nota1 Then
                MenNota = Datos.ToList.Item(C).Nota1
                Curso = Datos.ToList.Item(C).Course1
            End If
            If MenNota > Datos.ToList.Item(C).Nota2 Then
                MenNota = Datos.ToList.Item(C).Nota2
                Curso = Datos.ToList.Item(C).Course2
            End If
            If MenNota > Datos.ToList.Item(C).Nota3 Then
                MenNota = Datos.ToList.Item(C).Nota3
                Curso = Datos.ToList.Item(C).Course3
            End If
            MessageBox.Show("You have a low note " & MenNota & " in the course of   " & Curso & vbCrLf & "needs to see his advisor Mr: " & Datos.ToList.Item(C).Adviser)
        Else
            MessageBox.Show("You have not entered any information", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            TabControl1.SelectedIndex = 0
        End If

    End Sub

    Private Sub btn_Exit_DR_Click(sender As System.Object, e As System.EventArgs) Handles btn_Exit_DR.Click
        Me.Close()
    End Sub
Solicitar codigo fuente a:
cgprognet@hotmail.com
cgprognet@hotmail.com




No hay comentarios:

Publicar un comentario