示例#1
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            if (gvStudent.CurrentRow == null)
            {
                return;
            }

            if (gvStudent.CurrentRow.Index >= 0)
            {
                String next = "";
                if (String.IsNullOrEmpty(studentSelected.GradeLevel))
                {
                    if (!(String.IsNullOrEmpty(studentSelected.GradeBeforeDC)))
                    {
                        next = getNext(studentSelected.GradeBeforeDC);
                    }
                    else
                    {
                        next = "N";
                    }
                }
                List <GradeSection> gradeSec = sections.FindAll(p => p.GradeLevel.Equals(next));
                if (RegisteredStudents.Contains(studentSelected.StudentId))
                {
                    MessageBox.Show(this, "Student Already Registered!");
                }
                else if (gradeSec.Count == 0)
                {
                    MessageBox.Show("Cannot register student, No Section created yet. \n Please contact admin.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    frmStudentRegister fmStudentRegister = new frmStudentRegister();
                    fmStudentRegister.StudentId = studentSelected.StudentId;
                    //  if(String.IsNullOrEmpty(studentSelected.GradeLevel))

                    fmStudentRegister.GradeLevel      = studentSelected.GradeLevel;
                    fmStudentRegister.RegisterStudent = studentSelected;
                    fmStudentRegister.Gender          = studentSelected.Gender;
                    fmStudentRegister.Show(this);
                }
            }
        }
示例#2
0
        private void btnPromote_Click(object sender, EventArgs e)
        {
            frmStudentRegister fmStudentRegister = new frmStudentRegister();

            fmStudentRegister.Show(this);
        }
示例#3
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     if (RegisteredStudents.Contains(studentSelected.StudentId))
           MessageBox.Show(this, "Student Already Registered!");
     else
     {
         frmStudentRegister fmStudentRegister = new frmStudentRegister();
         fmStudentRegister.StudentId = studentSelected.StudentId;
         fmStudentRegister.GradeLevel = studentSelected.GradeLevel;
         fmStudentRegister.Gender = studentSelected.Gender;
         fmStudentRegister.Show(this);
     }
 }
示例#4
0
 private void btnPromote_Click(object sender, EventArgs e)
 {
     frmStudentRegister fmStudentRegister = new frmStudentRegister();
     fmStudentRegister.Show(this);
 }
示例#5
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            if (gvStudent.CurrentRow == null)
                return;

            if (gvStudent.CurrentRow.Index >= 0)
            {
                String next = "";
                if (String.IsNullOrEmpty(studentSelected.GradeLevel))
                {
                    if (!(String.IsNullOrEmpty(studentSelected.GradeBeforeDC)))
                    {
                        next = getNext(studentSelected.GradeBeforeDC);

                    }
                    else {
                        next = "N";
                    }
                }
                List<GradeSection> gradeSec = sections.FindAll(p => p.GradeLevel.Equals(next));
                if (RegisteredStudents.Contains(studentSelected.StudentId))
                {
                    MessageBox.Show(this, "Student Already Registered!");
                }
                else if (gradeSec.Count == 0)
                {
                    MessageBox.Show("Cannot register student, No Section created yet. \n Please contact admin.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    frmStudentRegister fmStudentRegister = new frmStudentRegister();
                    fmStudentRegister.StudentId = studentSelected.StudentId;
                    //  if(String.IsNullOrEmpty(studentSelected.GradeLevel))

                    fmStudentRegister.GradeLevel = studentSelected.GradeLevel;
                    fmStudentRegister.RegisterStudent = studentSelected;
                    fmStudentRegister.Gender = studentSelected.Gender;
                    fmStudentRegister.Show(this);
                }
            }
        }