Esempio n. 1
0
        private void radButton1_Click(object sender, EventArgs e)
        {
            frmControlSubjects fmControlSubjects = new frmControlSubjects();

            if (GlobalClass.gvDatasource == 1)
            {
                fmControlSubjects.Schedule = AddToSched;
            }

            if (GlobalClass.gvDatasource == 2)
            {
                ControlSched.AddRange(AddToSched);
                fmControlSubjects.AddedSched = AddToSched;
            }

            if (GlobalClass.gvDatasource == 3)
            {
                fmControlSubjects.ControlSchedule = AddToSched;
            }

            GlobalClass.fromScreen             = "Selector";
            fmControlSubjects.controlStudentId = this.ControlStudent.StudentId;

            fmControlSubjects.Show();
            this.Close();
        }
Esempio n. 2
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. 3
0
        private void radButton1_Click(object sender, EventArgs e)
        {
            frmControlSubjects fmControlSubjects = new frmControlSubjects();
            if (GlobalClass.gvDatasource == 1)
                fmControlSubjects.Schedule = AddToSched;

            if (GlobalClass.gvDatasource == 2)
            {
                ControlSched.AddRange(AddToSched);
                fmControlSubjects.AddedSched = AddToSched;
              
            }

            if (GlobalClass.gvDatasource == 3)
                fmControlSubjects.ControlSchedule = AddToSched;

            GlobalClass.fromScreen = "Selector";
            fmControlSubjects.controlStudentId = this.ControlStudent.StudentId;
           
            fmControlSubjects.Show();
            this.Close();
           
        }
Esempio n. 4
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. 5
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();
        }