Exemple #1
0
    public void FillDDL()
    {
        try
        {
            BLL_Infra_InspectionType onjInsp = new BLL_Infra_InspectionType();
            DataTable FleetDT = objVsl.GetFleetList(Convert.ToInt32(Session["USERCOMPANYID"].ToString()));
            DDLFleet.DataSource     = FleetDT;
            DDLFleet.DataTextField  = "Name";
            DDLFleet.DataValueField = "code";
            DDLFleet.DataBind();
            ListItem li = new ListItem("--SELECT ALL--", "0");
            DDLFleet.Items.Insert(0, li);

            BLL_Infra_Company objInfra = new BLL_Infra_Company();
            ddlVessel_Manager.DataSource     = objInfra.Get_Company_Parent_Child(1, 0, 0);
            ddlVessel_Manager.DataTextField  = "COMPANY_NAME";
            ddlVessel_Manager.DataValueField = "ID";
            ddlVessel_Manager.DataBind();
            ddlVessel_Manager.Items.Insert(0, new ListItem("-Select All-", "0"));



            DataTable dtVessel = objVsl.Get_VesselList(0, 0, Convert.ToInt32(Session["USERCOMPANYID"].ToString()), "", Convert.ToInt32(Session["USERCOMPANYID"].ToString()));
            DDLVessel.DataSource     = dtVessel;
            DDLVessel.DataTextField  = "Vessel_name";
            DDLVessel.DataValueField = "Vessel_id";
            DDLVessel.DataBind();
            DDLVessel.Items.Insert(0, new ListItem("--SELECT--", null));



            DataTable dtSup = objInsp.Get_Supritendent_Users(null, null);
            DDLInspector.DataSource     = dtSup;
            DDLInspector.DataTextField  = "Name";
            DDLInspector.DataValueField = "UserID";
            DDLInspector.DataBind();
            DDLInspector.Items.Insert(0, new ListItem("--SELECT--", null));

            DDLInspectorA.DataSource     = dtSup;
            DDLInspectorA.DataTextField  = "Name";
            DDLInspectorA.DataValueField = "UserID";
            DDLInspectorA.DataBind();
            DDLInspectorA.Items.Insert(0, new ListItem("--SELECT--", null));

            DataTable dtInsp = onjInsp.Get_InspectionTypeList();


            ddlInspectionType.DataSource     = dtInsp;
            ddlInspectionType.DataTextField  = "InspectionTypeName";
            ddlInspectionType.DataValueField = "InspectionTypeId";
            ddlInspectionType.DataBind();
            ddlInspectionType.Items.Insert(0, new ListItem("--SELECT--", null));
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
 /// <summary>
 /// Bind all inspector list
 /// </summary>
 public void VET_Get_InspectorList()
 {
     try
     {
         BLL_VET_VettingLib objBLLVetLib = new BLL_VET_VettingLib();
         DataTable          dt           = objBLLVetLib.VET_Get_InspectorList();
         DDLInspector.DataSource     = dt;
         DDLInspector.DataTextField  = "NAME";
         DDLInspector.DataValueField = "UserID";
         DDLInspector.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
     {
         DDLVessel.ClearSelection();
         DDLVetType.ClearSelection();
         DDLStatus.ClearSelection();
         DDLJobStatus.ClearSelection();
         txtDueDays.Text               = "";
         rbtnValid.Checked             = false;
         rbtnObservation.SelectedValue = "0";
         DDLOilMajor.ClearSelection();
         DDLInspector.ClearSelection();
         txtLVetFromDate.Text    = "";
         txtLVetToDate.Text      = "";
         txtVessel.Text          = "";
         chkVesselAssign.Checked = true;
         BindVesselDDL();
         UpdAdvFltr.Update();
         Bind_VettingIndex();
         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);
     }
 }