/// <summary> /// Get question no by section no /// </summary> public void VET_Get_QuestionNoBySectionNo() { try { BLL_VET_Questionnaire objBLLQuest = new BLL_VET_Questionnaire(); DDLQuestion.DataSource = objBLLQuest.VET_Get_QuestionNoBySectionNo(UDFLib.ConvertToInteger(ViewState["Questionnaire_ID"].ToString()), DDLSection.SelectedValues); DDLQuestion.DataTextField = "Question_No"; DDLQuestion.DataValueField = "ID"; DDLQuestion.DataBind(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
protected void btnClearFilter_Click(object sender, ImageClickEventArgs e) { try { txtQuestion.Text = ""; DDLSection.ClearSelection(); DDLQuestion.ClearSelection(); VET_Get_QuestionList(); VET_Get_QuestionnaireDetails(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
/// <summary> /// Bind Question number by questionnire id /// </summary> public void VET_Get_QuestionNoByQuestionnireId() { try { if (DDLQuestionnaire.SelectedValues.Rows.Count > 0) { BLL_VET_Index objBLLIndx = new BLL_VET_Index(); DataTable dtQuestionNo = objBLLIndx.VET_Get_QuestionNoByQuestionnireId(DDLQuestionnaire.SelectedValues, DDLSection.SelectedValues); DDLQuestion.DataSource = dtQuestionNo; DDLQuestion.DataTextField = "Question_No"; DDLQuestion.DataValueField = "ID"; DDLQuestion.DataBind(); } } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
protected void btnClearAllFilter_Click(object sender, ImageClickEventArgs e) { try { DDLQuestionnaire.ClearSelection(); DDLSection.ClearSelection(); DDLQuestion.ClearSelection(); rbtnType.SelectedValue = "0"; DDLFleet.SelectedValue = "0"; DDLVesselObs.ClearSelection(); DDLOilMajorObs.ClearSelection(); DDLInspectorObs.ClearSelection(); txtObservationVessel.Text = ""; DDLCategories.ClearSelection(); DDLRiskLevel.ClearSelection(); txtLObsFromDate.Text = ""; txtLObsToDate.Text = ""; chkVesselAssign.Checked = true; BindVesselDDLByFleet(); UpdAdvFltrObs.Update(); Bind_ObservationIndex(); if (hfAdv.Value == "o") { String tgladvsearchClr = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr", tgladvsearchClr, true); } else { String tgladvsearchClr1 = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr1", tgladvsearchClr1, true); } } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');"; ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true); } }
protected void Page_Load(object sender, EventArgs e) { try { if (GetSessionUserID() == 0) { Response.Redirect("~/account/login.aspx"); } String msgretv = String.Format("setTimeout(getOperatingSystem,500);"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "msgret6v", msgretv, true); UserAccessValidation(); setDateFormat(); if (!IsPostBack) { ViewState["Status"] = ""; VET_GET_QuestionnireList(); BindFleetDLL(); if (Session["USERFLEETID"] == null) { DDLFleet.SelectedValue = "0"; } else { DDLFleet.SelectedValue = Session["USERFLEETID"].ToString(); } if (Request.QueryString["Question_ID"] != null && Request.QueryString["FleetCode"] != null && Request.QueryString["Vetting_Type_ID"] != null && Request.QueryString["Status"] != null) { int Question_ID = UDFLib.ConvertToInteger(Request.QueryString["Question_ID"].ToString()); ViewState["Question_ID"] = Request.QueryString["Question_ID"].ToString(); int FleetCode = UDFLib.ConvertToInteger(Request.QueryString["FleetCode"].ToString()); ViewState["FleetCode"] = Request.QueryString["FleetCode"].ToString(); int Vetting_Type_ID = UDFLib.ConvertToInteger(Request.QueryString["Vetting_Type_ID"].ToString()); ViewState["Vetting_Type_ID"] = Request.QueryString["Vetting_Type_ID"].ToString(); string Status = Request.QueryString["Status"].ToString(); ViewState["Status"] = Request.QueryString["Status"].ToString(); VET_Get_QuestionnaireIdByQuestionId(); VET_Get_SectionByQuestionnireId(); VET_Get_QuestionNoByQuestionnireId(); DDLQuestion.Select(ViewState["Question_ID"].ToString()); DDLFleet.SelectedValue = ViewState["FleetCode"].ToString(); Bind_ObservationIndex(); } VET_Get_OilMajorListObs(); VET_Get_InspectorListObs(); Bind_RiskLevel(); VET_Get_ObservationCategories(); BindVesselDDLByFleet(); Bind_ObservationIndex(); } } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); } }