コード例 #1
0
ファイル: frmStudentList.cs プロジェクト: RazenRyne/eSAR_new
        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
ファイル: frmStudentList.cs プロジェクト: dansalan/DCFIv5
 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
ファイル: frmStudentDetails.cs プロジェクト: RazenRyne/eSAR
 private void btnPromote_Click(object sender, EventArgs e)
 {
     frmStudentRegister fmStudentRegister = new frmStudentRegister();
     fmStudentRegister.Show(this);
 }
コード例 #5
0
ファイル: frmStudentList.cs プロジェクト: RazenRyne/eSAR
        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);
                }
            }
        }