示例#1
0
 /// <summary>
 /// Bind observation categories
 /// </summary>
 public void VET_Get_ObservationCategories()
 {
     try
     {
         BLL_VET_Index objBLLIndx = new BLL_VET_Index();
         string        Mode       = "Edit";
         DataTable     dt         = objBLLIndx.VET_Get_ObservationCategories(Mode);
         DDLCategories.DataSource     = dt;
         DDLCategories.DataTextField  = "OBSCategory_Name";
         DDLCategories.DataValueField = "OBSCategory_ID";
         DDLCategories.DataBind();
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
         string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
     }
 }
示例#2
0
    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);
        }
    }