Esempio n. 1
0
 /// <summary>
 /// Bind all company list
 /// </summary>
 public void INF_Get_CompanyList()
 {
     try
     {
         DDLCompany.DataSource     = objMenuBLL.INF_Get_CompanyList();
         DDLCompany.DataTextField  = "Company_Name";
         DDLCompany.DataValueField = "Id";
         DDLCompany.DataBind();
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
         string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
     }
 }
Esempio n. 2
0
 protected void btnClearFilter_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         DDLCompany.ClearSelection();
         DDLDepartment.ClearSelection();
         DDLMenu.ClearSelection();
         DDLMenu.ClearSelection();
         DDLSubMenu.ClearSelection();
         DDLUser.ClearSelection();
         DDLPageName.ClearSelection();
         Bind_AccessRightsReport();
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
         string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
     }
 }
Esempio n. 3
0
    private void BindCom()
    {
        try
        {
            SqlParameter[] arrparm = new SqlParameter[1];
            arrparm[0] = new SqlParameter("@Action", "SELECT");
            DataSet DSRecord = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Company_CRUD", arrparm);
            if (DSRecord.Tables[0].Rows.Count > 0)
            {
                DDLCompany.DataSource     = DSRecord.Tables[0];
                DDLCompany.DataTextField  = "CompanyName";
                DDLCompany.DataValueField = "ID";
                DDLCompany.DataBind();
                DDLCompany.Items.Insert(0, new ListItem("Select", "0"));
            }
        }

        catch (Exception ex)
        {
            ShowMessage(ex.Message, MessageType.Error);
        }
    }
    public void BindSupAttGrid(DateTime StartDate)
    {
        DataSet dtCompany = objCom.Get_Company_Parent_Child(1, UDFLib.ConvertToInteger(Session["USERCOMPANYID"].ToString()), 0);;

        DDLCompany.DataSource     = dtCompany.Tables[0];
        DDLCompany.DataTextField  = "Company_Name";
        DDLCompany.DataValueField = "ID";
        DDLCompany.DataBind();
        DDLCompany.Items.Insert(0, new ListItem("-- ALL --", null));

        dt = objInsp.TEC_Get_SupritendentAttendanceWithPort(StartDate, UDFLib.ConvertToInteger(DDLCompany.SelectedValue));

        grdSupAtt.DataSource = dt;
        grdSupAtt.DataBind();

        //string js = "LastLoad()";
        // ScriptManager.RegisterStartupScript(this, this.GetType(), "ddd", js, true);
        //string[] retval = new string[2];
        //retval = asncLoadCalendarBySupt("0", StartDate.ToString());

        //newt0.InnerHtml = retval[0];
        //newt.InnerHtml = retval[2];
    }
    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);
        }
    }