Esempio n. 1
0
        private void btnControl_Click(object sender, EventArgs e)
        {
            if (gvStudent.CurrentRow == null)
            {
                return;
            }

            if (gvStudent.CurrentRow.Index >= 0)
            {
                if (!RegisteredStudents.Contains(studentSelected.StudentId))
                {
                    MessageBox.Show(this, "Student Needs to be Registered First!");
                }
                else
                {
                    frmControlSubjects fmControlSubjects = new frmControlSubjects();
                    fmControlSubjects.controlStudentId = studentSelected.StudentId;

                    fmControlSubjects.ShowDialog(this);
                }
            }
        }
Esempio n. 2
0
        private void btnControl_Click(object sender, EventArgs e)
        {
            if (!RegisteredStudents.Contains(studentSelected.StudentId))
                MessageBox.Show(this, "Student Needs to be Registered First!");
             else
            {
                frmControlSubjects fmControlSubjects = new frmControlSubjects();
                fmControlSubjects.controlStudentId = studentSelected.StudentId;

                fmControlSubjects.ShowDialog(this);
            }
        }
Esempio n. 3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            RegistrationServiceClient registrationService = new RegistrationServiceClient();

            EnrolMe.StudentSY = RegisterStudent.StudentId + SY;
            EnrolMe.StudentId = RegisterStudent.StudentId;
            EnrolMe.SY = SY;
            EnrolMe.GradeLevel = this.GradeLevel;
            EnrolMe.Dismissed = false;
            EnrolMe.DiscountId = Int32.Parse(cmbScholarship.SelectedValue.ToString());
            EnrolMe.Rank = (int)RegisterStudent.ranking;
            //EnrolMe.GradeSectionCode=
            if (EnrolMe.Stat.Equals("b") || EnrolMe.Stat.Equals("c"))
            {
                if (registrationService.EnrolStudent(EnrolMe))
                {
                    Log("C", "StudentEnrolments", EnrolMe);
                    Log("U", "Students", EnrolMe);
                    Log("C", "StudentTraits", EnrolMe);

                    MessageBox.Show(this, "Student Successfully Registered.");
                    frmControlSubjects fmControlSubjects = new frmControlSubjects();
                    fmControlSubjects.controlStudentId = RegisterStudent.StudentId;
                    fmControlSubjects.ShowDialog(this);

                }
                else
                {
                    MessageBox.Show(this, "Student Registration Failed.");
                }
            }
            else
            {
                if (registrationService.EnrolStudent(EnrolMe))
                {
                    Log("C", "StudentEnrolments", EnrolMe);
                    Log("U", "Students", EnrolMe);
                    Log("C", "StudentTraits", EnrolMe);

                    MessageBox.Show(this, "Student Successfully Registered.");

                    frmControlSubjects fmControlSubjects = new frmControlSubjects();
                    fmControlSubjects.controlStudentId = RegisterStudent.StudentId;
                    fmControlSubjects.ShowDialog(this);

                }
                else
                    MessageBox.Show(this, "Student Registration Failed.");
            }
            this.Close();
        }