protected void LoadDataTable() { try { BEProvider objBEExamProvider = new BEProvider(); //objBEExamProvider.strStudentName = txtStudentName.Text.Trim().ToString(); objBEExamProvider.strStudentName = ""; objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); new BProvider().BGetStudentEnrollments(objBEExamProvider); if (objBEExamProvider.DtResult.Rows.Count > 0) { trGridPages.Visible = true; gvExamStatus.DataSource = objBEExamProvider.DtResult; gvExamStatus.Rebind(); } else { trGridPages.Visible = true; gvExamStatus.DataSource = new string[] { }; //gvExamStatus.DataBind(); } } catch (Exception) { } }
protected void BindDropdowns() { try { BEProvider objBEExamProvider = new BEProvider(); BProvider objBExamProvider = new BProvider(); objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBExamProvider.BGetStudentsAndCourses(objBEExamProvider); ddlStudents.DataSource = objBEExamProvider.DsResult.Tables[0]; ddlStudents.DataValueField = "UserId"; ddlStudents.DataTextField = "UserName"; ddlStudents.DataBind(); //BEAdmin objBEAdmin = new BEAdmin(); //BAdmin objBAdmin = new BAdmin(); //objBAdmin.BBindCourse(objBEAdmin); //ddlCourse.DataSource = objBEAdmin.DtResult.DefaultView; //ddlCourse.DataValueField = "CourseID"; //ddlCourse.DataTextField = "CourseName"; //ddlCourse.DataBind(); } catch { } }
protected void btnProceed_Click(object sender, EventArgs e) { try { if (Session["EP_Exam"] != null) { BEProvider objBEExamProvider = (BEProvider)Session["EP_Exam"]; BProvider objBExamProvider = new BProvider(); objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBExamProvider.BSaveExamDetails(objBEExamProvider); trSuccess.Visible = true; trButtons.Visible = false; trMessage.Visible = true; objBEExamProvider = null; objBEExamProvider = null; Session["EP_Exam"] = null; Session["DT_Notes"] = null; Session["DT_Rules"] = null; lblMsg.Text = "<img src='../Images/yes.png' align='middle'/> <font color='#00C000'>" + Resources.ResMessages.Provider_ExamDetailsSuccess + "</font>"; } } catch { } }
protected void btnProceed_Click(object sender, EventArgs e) { try { if (Session["EP_Exam"] != null) { BEProvider objBEExamProvider = (BEProvider)Session["EP_Exam"]; BProvider objBExamProvider = new BProvider(); // objBEExamProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBExamProvider.BAdminSaveExamDetails(objBEExamProvider); trButtons.Visible = false; trMessage.Visible = true; objBEExamProvider = null; objBEExamProvider = null; Session["EP_Exam"] = null; Session["DT_Notes"] = null; Session["DT_Rules"] = null; } else { } } catch { } }
protected void btnEnroll_Click(object sender, EventArgs e) { try { BEProvider objBEExamProvider = new BEProvider(); BProvider objBExamProvider = new BProvider(); objBEExamProvider.IntUserID = Convert.ToInt32(ddlprovider.SelectedValue.ToString()); objBEExamProvider.IntCourseID = Convert.ToInt32(ddlCourse.SelectedValue.ToString()); objBEExamProvider.IntExamID = Convert.ToInt32(ddlStudents.SelectedValue.ToString()); objBExamProvider.BAdminEnrollStudent(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 { } }
protected void BindCourseName() { try { BEProvider objBEProvider = new BEProvider(); BProvider objBProvider = new BProvider(); objBEProvider.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBProvider.BGetProviderCourseDetails(objBEProvider); if (objBEProvider.DtResult.Rows.Count > 0) { ddlCourse.AppendDataBoundItems = true; ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1")); ddlCourse.DataSource = objBEProvider.DtResult; ddlCourse.DataValueField = "CourseID"; ddlCourse.DataTextField = "CourseName"; ddlCourse.DataBind(); } else { ddlCourse.Items.Clear(); ddlCourse.AppendDataBoundItems = true; ddlCourse.Items.Add(new RadComboBoxItem("--Select Course--", "-1")); ddlCourse.DataSource = null; ddlCourse.DataBind(); } } catch (Exception Ex) { ErrorHandlers.ErrorLog.WriteError(Ex); } }
protected void LoadCourseDetails() { try { BEProvider objBEProvider = new BEProvider(); BProvider objBProvider = new BProvider(); objBEProvider.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBProvider.BGetAllCourseDetails(objBEProvider); if (objBEProvider.DtResult.Rows.Count > 0) { rcbCourses.DataSource = objBEProvider.DtResult; rcbCourses.DataTextField = "CourseName"; rcbCourses.DataValueField = "CourseID"; rcbCourses.DataBind(); } gvReports.DataSource = new object[] { }; gvReports.DataBind(); } catch (Exception Ex) { ErrorHandlers.ErrorLog.WriteError(Ex); } }
protected void GetStudentDetails() { BEProvider objBEProvider = new BEProvider(); BProvider objBProvider = new BProvider(); objBEProvider.IntStudentID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["StudentID"].ToString())); objBProvider.BGetStudentDetails(objBEProvider); if (objBEProvider.DtResult != null) { if (objBEProvider.DtResult.Rows.Count > 0) { lblstudentfirstname.Text = objBEProvider.DtResult.Rows[0]["studentName"].ToString(); lblEmail.Text = objBEProvider.DtResult.Rows[0]["EmailAddress"].ToString(); lblPhoneNumber.Text = CommonFunctions.CheckNullValue(objBEProvider.DtResult.Rows[0]["PhoneNumber"].ToString()); lblTimeZone.Text = objBEProvider.DtResult.Rows[0]["TimeZone"].ToString(); lblSpecialNeeds.Text = objBEProvider.DtResult.Rows[0]["SpecialNeeds"].ToString(); string imgpath = objBEProvider.DtResult.Rows[0]["PhotoIdentity"].ToString(); if (imgpath != "") { //imgstudent.ImageUrl = "~/Student/Student_Identity/" + imgpath.Substring(3).ToString(); imgstudent.ImageUrl = new AppSecurity().ImageToBase64(imgpath.Substring(3).ToString()); } //if (System.IO.File.Exists(Server.MapPath("../Uploads/StudentIdentity/") + imgpath.ToString())) // imgstudent.ImageUrl = "../Uploads/StudentIdentity/" + imgpath.ToString(); if (objBEProvider.DtResult.Rows[0]["Comments"] != DBNull.Value && objBEProvider.DtResult.Rows[0]["Comments"].ToString() != string.Empty) { lblComments.Text = objBEProvider.DtResult.Rows[0]["Comments"].ToString(); } else { lblComments.Text = "N/A"; } } } }
protected void btnDelete_Click(object sender, EventArgs e) { BEProvider objBEExamProvider = new BEProvider(); BProvider objBProvider = new BProvider(); objBEExamProvider.IntCourseID = Convert.ToInt32(Request.QueryString["CourseID"].ToString()); objBProvider.BDeleteCourse(objBEExamProvider); if (objBEExamProvider.IntResult == 1) { lblInfo.Text = Resources.AppMessages.Provider_DeleteCourse_Success_DeleteCourse; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Success; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success); trMessage.Visible = true; trDelete.Visible = false; } if (objBEExamProvider.IntResult == 0) { lblInfo.Text = Resources.AppMessages.Provider_DeletCourse_Error_DeleteCoursePending; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); trMessage.Visible = true; } }
protected void btnUpdate_Click(object sender, EventArgs e) { BEProvider objBEExamProvider = new BEProvider(); BProvider objBPrrovider = new BProvider(); objBEExamProvider.ddlStatus = ddlStatus.SelectedValue.ToString(); objBEExamProvider.IntEnrollID = Convert.ToInt32(Request.QueryString["EnrollmentID"].ToString()); objBPrrovider.BUpdateEnrollStatus(objBEExamProvider); trMessage.Visible = true; if (objBEExamProvider.IntResult == 1) { ddlStatus.Visible = false; lblStatus.Text = ddlStatus.SelectedItem.Text; lblInfo.Text = Resources.AppMessages.Provider_EditEnrollment_Success_EditEnrollmentStatus; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Success; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success); btnUpdate.Visible = false; btnCancel.Visible = false; } else { btnUpdate.Visible = true; btnCancel.Visible = true; ddlStatus.Visible = true; lblInfo.Text = Resources.AppMessages.Provider_EditEnrollment_Error_EditEnrollmentStatus; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); } }
protected void btnAdd_Click(object sender, EventArgs e) { BEProvider objBEExamProvider = new BEProvider(); BProvider objBExamProvider = new BProvider(); objBEExamProvider.strFirstName = txtFirstName.Text; lblFirstName.Text = txtFirstName.Text; objBEExamProvider.strLastName = txtLastName.Text; lblLastName.Text = txtLastName.Text; objBEExamProvider.strEmailAddress = txtEmailAddress.Text; lblEmailAddress.Text = txtEmailAddress.Text; objBEExamProvider.StrComments = txtcomments.Value; lblComments.Text = txtcomments.Value; lblNewCourse.Text = rcbNewCourses.SelectedItem.Text.ToString(); objBEExamProvider.IntCourseID = Convert.ToInt32(rcbNewCourses.SelectedValue); objBEExamProvider.IntProviderID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBEExamProvider.strPassword = GetRandomPassword(Length); objBEExamProvider.strUserName = txtUserID.Text; lblUserName.Text = txtUserID.Text; trMessage.Visible = true; if (ChkSpecialNeeds.Checked == true) { objBEExamProvider.strSpecialNeeds = true; lblSpecialNeeds.Text = "Yes"; } else { objBEExamProvider.strSpecialNeeds = false; lblSpecialNeeds.Text = "No"; } objBExamProvider.BAddStudent(objBEExamProvider); if (objBEExamProvider.IntResult == 0) { lblInfo.Text = Resources.AppMessages.Provider_AddStudent_Error_AddStudent; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); trAddStudent.Visible = true; trAddStudentConfirm.Visible = false; trEnrollStudent.Visible = false; trEnrollStudentConfirmation.Visible = false; } if (objBEExamProvider.IntResult == 1) { lblInfo.Text = Resources.AppMessages.Provider_AddStudent_Success_AddStudent; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Success; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success); trAddStudent.Visible = false; trAddStudentConfirm.Visible = true; trEnrollStudent.Visible = false; trEnrollStudentConfirmation.Visible = false; } }
// GetAdditionalRules public void BGetAdditionalRules(BEProvider objBEExamProvider) { try { new DProvider().DGetAdditionalRules(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BGetProviderExams(BEProvider objBEProvider) { try { new DProvider().DGetProviderExams(objBEProvider); } catch (Exception Ex) { throw Ex; } }
public void BProviderEnrollSelectedStudents(BEProvider objBEExamProvider) { try { new DProvider().DProviderEnrollSelectedStudents(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BGetAllCourseDetails(BEProvider objBEExamProvider) { try { new DProvider().DGetAllCourseDetails(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// BDeleteEnrollmentStatus /// </summary> /// <param name="objBEExamProvider"></param> public void BDeleteEnrollmentStatus(BEProvider objBEProvider) { try { new DProvider().DDeleteEnrollmentStatus(objBEProvider); } catch (Exception Ex) { throw Ex; } }
public void BCheckPrimaryIns(BEProvider objBEExamProvider) { try { new DProvider().DCheckPrimaryIns(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// BGetEnrollStudentDetails /// </summary> /// <param name="objBEProvider"></param> public void BGetEnrollStudentDetails(BEProvider objBEExamProvider) { try { new DProvider().DGetEnrollStudentDetails(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BProviderEnrollStudentCourse(BEProvider objBEExamProvider) { try { new DProvider().DProviderEnrollStudentCourse(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// Delete Exam /// </summary> /// <param name="objBEExamProvider"></param> public void BDeleteExam(BEProvider objBEExamProvider) { try { new DProvider().DDeleteExam(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// DGetStudentName /// </summary> /// <param name="objBEProvider"></param> public void BGetStudentName(BEProvider objBEExamProvider) { try { new DProvider().DGetStudentName(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BSaveAdminUploads(BEProvider objBEExamProvider) { try { new DProvider().DSaveAdminUploads(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BAdminValidateExam(BEProvider objBEExamProvider) { try { new DProvider().DAdminValidateExam(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// Get Student Transactions associated with the current exam provider /// </summary> /// <param name="objBEExamProvider"></param> public void BGetStudentTransactionsForCurrentProvider(BEProvider objBEExamProvider) { try { new DProvider().DGetStudentTransactionsForCurrentProvider(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BDeleteStudent(BEProvider objBEProvider) { try { new DProvider().DDeleteStudent(objBEProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// BUpdateEnrollStatus /// </summary> /// <param name="objBEProvider"></param> public void BUpdateEnrollStatus(BEProvider objBEExamProvider) { try { new DProvider().DUpdateEnrollStatus(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// BAddStudent /// </summary> /// <param name="objBEProvider"></param> /// public void BAddStudent(BEProvider objBEExamProvider) { try { new DProvider().DAddStudent(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
public void BAdminSaveExamDetails(BEProvider objBEExamProvider) { try { new DProvider().DAdminSaveExamDetails(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// Get Selected Exam Details /// </summary> /// <param name="objBEExamProvider"></param> public void BGetSelectedExamDetails(BEProvider objBEExamProvider) { try { new DProvider().DGetSelectedExamDetails(objBEExamProvider); } catch (Exception Ex) { throw Ex; } }
protected void btnUpdate_Click(object sender, EventArgs e) { try { BEProvider objBEExamProvider = new BEProvider(); BProvider objBProvider = new BProvider(); objBEExamProvider.IntCourseID = Convert.ToInt32(Request.QueryString["CourseID"]); objBEExamProvider.strCourseID = TxtCourseID.Text; lblCourseID.Text = TxtCourseID.Text; objBEExamProvider.strCourseName = txtCourseName.Text; lblCourse.Text = txtCourseName.Text; objBEExamProvider.IntstatusFlag = Convert.ToInt32(ddlStatus.SelectedValue.ToString()); if (ddlStatus.SelectedValue.ToString() == "1") { lblStatus.Text = "Active"; } else { lblStatus.Text = "Inactive"; } objBEExamProvider.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID].ToString()); objBProvider.BUpdateCourseDetails(objBEExamProvider); trMessage.Visible = true; if (objBEExamProvider.IntResult == 1) { lblInfo.Text = Resources.AppMessages.Provider_EditCourse_Success_CourseUpdated; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Success); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Success; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Success); trView.Visible = true; trEdit.Visible = false; lblModifiedDate1.Text = DateTime.Now.ToShortDateString(); } else if (objBEExamProvider.IntResult == 0) { lblInfo.Text = Resources.AppMessages.Provider_EditCourse_Error_CourseExists; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); } else if (objBEExamProvider.IntResult == 2) { lblInfo.Text = Resources.AppMessages.Provider_EditCourse_Error_PendingExams; lblInfo.ForeColor = System.Drawing.Color.FromName(Resources.AppConfigurations.Color_Error); ImgInfo.ImageUrl = Resources.AppConfigurations.Image_Error; tdInfo.Attributes.Add("style", Resources.AppConfigurations.Color_Table_Error); } } catch (Exception Ex) { ErrorHandlers.ErrorLog.WriteError(Ex); } }