private void loadGrid() { try { if (string.Compare(rdExamType.SelectedValue, "Online", true) == 0) { SMHR_TRAINING_ONLINEASSESSMENT oSMHR_TRAINING_ONLINEASSESSMENT = new SMHR_TRAINING_ONLINEASSESSMENT(); oSMHR_TRAINING_ONLINEASSESSMENT.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); oSMHR_TRAINING_ONLINEASSESSMENT.TRAINING_ASSESSMENT_COURSE_ID = Convert.ToInt32(rc_Course.SelectedValue); oSMHR_TRAINING_ONLINEASSESSMENT.TRAINING_ASSESSMENT_COURSESCHEDULE_ID = Convert.ToInt32(rc_CourseSchedule.SelectedValue); oSMHR_TRAINING_ONLINEASSESSMENT.TRAINING_ASSESSMENT_ID = Convert.ToInt32(Session["EMP_ID"]); oSMHR_TRAINING_ONLINEASSESSMENT.OPERATION = operation.Select2; DataTable dt = BLL.get_OnlineAssessment(oSMHR_TRAINING_ONLINEASSESSMENT); if (dt.Columns.Count > 1) { RG_Assessments.DataSource = dt; RG_Assessments.DataBind(); } else { RG_Assessments.DataSource = null; RG_Assessments.DataBind(); } RG_Assessments.Visible = true; RadGrid1.Visible = false; } else { RadGrid1.Visible = true; RG_Assessments.Visible = false; SMHR_TRAINING_OFFLINEASSESSMENTS _obj_SMHR_Offlineassesments = new SMHR_TRAINING_OFFLINEASSESSMENTS(); _obj_SMHR_Offlineassesments.OFFLINEASSESSMENT_ORGID = Convert.ToInt32(Session["ORG_ID"]); _obj_SMHR_Offlineassesments.OFFLINEASSESSMENT_COURSEID = Convert.ToInt32(rc_Course.SelectedValue); _obj_SMHR_Offlineassesments.OFFLINEASSESSMENT_COURSESCHEDULEID = Convert.ToInt32(rc_CourseSchedule.SelectedValue); _obj_SMHR_Offlineassesments.OFFLINEASSESSMENT_ID = Convert.ToInt32(Session["EMP_ID"]); _obj_SMHR_Offlineassesments.OPERATION = operation.Select2; DataTable DT = BLL.get_OfflineAssessment(_obj_SMHR_Offlineassesments); if (DT.Columns.Count > 1) { RadGrid1.DataSource = DT; RadGrid1.DataBind(); } else { RadGrid1.DataSource = null; RadGrid1.DataBind(); } RG_Assessments.Visible = false; RadGrid1.Visible = true; } } catch (Exception ex) { //Utils.HandleWebException(ex, this); SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Frm_Assessment", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void loadGrid() { try { SMHR_OFFLINEASSESSMENT_RESULT oSMHR_TRAINING_ONLINEASSESSMENT = new SMHR_OFFLINEASSESSMENT_RESULT(); if (string.Compare(rdExamType.SelectedValue, "Online", true) == 0) { oSMHR_TRAINING_ONLINEASSESSMENT.OPERATION = operation.Online; } else if (string.Compare(rdExamType.SelectedValue, "Offline", true) == 0) { oSMHR_TRAINING_ONLINEASSESSMENT.OPERATION = operation.Offline; } oSMHR_TRAINING_ONLINEASSESSMENT.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); oSMHR_TRAINING_ONLINEASSESSMENT.OFFLINE_EMPID = Convert.ToInt32(Session["EMP_ID"]); DataTable dt = BLL.get_OfflineAssessmentResult(oSMHR_TRAINING_ONLINEASSESSMENT); if (dt.Columns.Count > 1) { RG_Assessments.DataSource = dt; RG_Assessments.DataBind(); } else { RG_Assessments.DataSource = null; RG_Assessments.DataBind(); } RG_Assessments.Visible = true; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_AssessmentResults", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }