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); } }
public void Load_ManningAgentList() { try { BLL_Infra_Company objComp = new BLL_Infra_Company(); DDLManningOffice.DataSource = objBLLCrew.Get_ManningAgentList(UDFLib.ConvertToInteger(Session["USERCOMPANYID"].ToString())); DDLManningOffice.DataTextField = "COMPANY_NAME"; DDLManningOffice.DataValueField = "ID"; DDLManningOffice.DataBind(); } catch { } }
protected void Load_DepartmentList_filter() { BLL_Infra_Company objCompBLL = new BLL_Infra_Company(); int iCompID = int.Parse(Session["UserCompanyID"].ToString()); DataTable dtfilter = objCompBLL.Get_CompanyDepartmentList(iCompID); ddlDepartment.Items.Clear(); ddlDepartment.DataSource = dtfilter; ddlDepartment.DataTextField = "VALUE"; ddlDepartment.DataValueField = "ID"; ddlDepartment.DataBind(); ddlDepartment.Items.Insert(0, new ListItem("-SELECT ALL-", "0")); }
public void Load_Department() { if (ddlDepartment.Items.Count == 0) { BLL_Infra_Company objCompany = new BLL_Infra_Company(); DataTable dt = objCompany.Get_CompanyDepartmentList(UDFLib.ConvertToInteger(Session["USERCOMPANYID"])); ddlDepartment.DataSource = dt; ddlDepartment.DataTextField = "Value"; ddlDepartment.DataValueField = "ID"; ddlDepartment.DataBind(); ddlDepartment.Items.Insert(0, new ListItem("-SELECT-", "0")); } }
public void Load_ManningAgentList() { try { if (ddlManningOffice.Items.Count == 0) { BLL_Infra_Company objComp = new BLL_Infra_Company(); ddlManningOffice.DataSource = objBLLCrew.Get_ManningAgentList(UDFLib.ConvertToInteger(Session["USERCOMPANYID"].ToString())); ddlManningOffice.DataTextField = "COMPANY_NAME"; ddlManningOffice.DataValueField = "ID"; ddlManningOffice.DataBind(); ddlManningOffice.Items.Insert(0, new ListItem("-Select-", "0")); } } catch { } }
protected void LoadData() { try { ViewState["AddEditFlag"] = "Add"; grvChecklist.DataSource = null; grvChecklist.DataBind(); tblChecklist.Visible = false; BLL_Infra_Company objCom = new BLL_Infra_Company(); DataSet dtCompany = objCom.Get_Company_Parent_Child(1, 0, 0);; DDLCompany.DataSource = dtCompany.Tables[0]; DDLCompany.DataTextField = "Company_Name"; DDLCompany.DataValueField = "ID"; DDLCompany.DataBind(); DDLCompany.Items.Insert(0, new ListItem("-- ALL --", null)); BLL_Infra_InspectionType onjInsp = new BLL_Infra_InspectionType(); DataTable FleetDT = objVsl.GetFleetList(Convert.ToInt32(Session["USERCOMPANYID"].ToString())); DDLFleetP.DataSource = FleetDT; DDLFleetP.DataTextField = "Name"; DDLFleetP.DataValueField = "code"; DDLFleetP.DataBind(); DDLFleetP.Items.Insert(0, new ListItem("-- ALL --", null)); DataTable dtVessel = objVsl.Get_VesselList(0, 0, 0, "", Convert.ToInt32(Session["USERCOMPANYID"].ToString())); DDLVesselP.DataSource = dtVessel; DDLVesselP.DataTextField = "Vessel_name"; DDLVesselP.DataValueField = "Vessel_id"; DDLVesselP.DataBind(); DDLVesselP.Items.Insert(0, new ListItem("-- Select --", null)); DataTable dtInsp = onjInsp.Get_InspectionTypeList(); ddlInspectionTypeP.DataSource = dtInsp; ddlInspectionTypeP.DataTextField = "InspectionTypeName"; ddlInspectionTypeP.DataValueField = "InspectionTypeId"; ddlInspectionTypeP.DataBind(); ddlInspectionTypeP.Items.Insert(0, new ListItem("--SELECT--", null)); DataTable dtPort = objInfra.Get_PortList(); if (dtPort.Rows.Count > 0) { drpPort.DataSource = dtPort; drpPort.DataValueField = "PORT_ID"; drpPort.DataTextField = "PORT_NAME"; drpPort.DataBind(); } drpPort.Items.Insert(0, new ListItem() { Value = "0", Text = "-Select-" }); txtStartDate.Enabled = true; DDLFleetP.Enabled = true; DDLVesselP.Enabled = true; ddlInspectionTypeP.Enabled = true; rdoFrequency.Enabled = true; drpPort.Visible = true; ViewState["ScheduleID"] = 0; ViewState["ScheduleID"] = "0"; txtStartDate.Text = DateTime.Now.Date.ToString("dd/MMM/yy"); txtEndDate.Text = ""; txtOneTime.Text = DateTime.Now.Date.ToString("dd/MMM/yy"); chkMonthWise.ClearSelection(); chkWeekDays.ClearSelection(); txtWeek.Text = "1"; chkSendEmail.Checked = false; chkImages.Checked = false; txtInspRemark.Text = ""; DDLFleetP.SelectedIndex = 0; DDLVesselP.SelectedIndex = 0; DDLInspectorP.SelectedIndex = 0; ddlDaysBefore.SelectedIndex = 6; rdoFrequency.SelectedIndex = 0; ddlInspectionTypeP.SelectedIndex = 0; ddlDuration.SelectedValue = "7"; rdoFrequency_SelectedIndexChanged(null, null); txtDurJobs.Text = "1"; Guid l = Guid.NewGuid(); } catch (Exception ex) { UDFLib.WriteExceptionLog(ex); } }