コード例 #1
0
 protected void btnEnroll_Click(object sender, EventArgs e)
 {
     try
     {
         BECourseAdmin objBEExamProvider = new BECourseAdmin();
         BCourseAdmin  objBExamProvider  = new BCourseAdmin();
         objBEExamProvider.IntUserID   = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString());
         objBEExamProvider.IntCourseID = Convert.ToInt32(ddlCourse.SelectedValue.ToString());
         objBEExamProvider.IntExamID   = Convert.ToInt32(ddlStudents.SelectedValue.ToString());
         objBExamProvider.BEnrollStudent(objBEExamProvider);
         if (objBEExamProvider.IntResult.ToString() == "1")
         {
             lblSuccess.Visible = true;
             //lblSuccess.Text = "Student is enrolled for an exam successfully";
             lblSuccess.Text      = Resources.ResMessages.Provider_EnrollStudentSuccess;
             lblSuccess.ForeColor = System.Drawing.Color.Green;
             this.LoadDataTable();
         }
         else
         {
             lblSuccess.Visible = true;
             //lblSuccess.Text = "Student is already enrolled for this Exam";
             lblSuccess.Text      = Resources.ResMessages.Provider_EnrollStudentExam;
             lblSuccess.ForeColor = System.Drawing.Color.Red;
         }
     }
     catch
     {
     }
 }