Пример #1
0
        private void BindLorry()
        {
            BindDropdownDAL obj        = new BindDropdownDAL();
            var             TruckNolst = obj.BindTruckNowithLastDigit();

            ddlLorry_No.DataSource     = TruckNolst;
            ddlLorry_No.DataTextField  = "Lorry_No";
            ddlLorry_No.DataValueField = "Lorry_IdNo";
            ddlLorry_No.DataBind();
            ddlLorry_No.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
Пример #2
0
        private void BindDropdown()
        {
            BindDropdownDAL obj         = new BindDropdownDAL();
            var             senderLst   = obj.BindSender();
            var             receiverLst = obj.BindSender();
            var             TruckNolst  = obj.BindTruckNowithLastDigit();
            var             ToCity      = obj.BindAllToCity();
            var             Agent       = obj.BindAgent();
            var             bank        = obj.BindBank();
            var             UnitName    = obj.BindUnitName();
            var             ToCityComp  = obj.BindLocFrom();

            obj = null;

            ddlSender.DataSource     = senderLst;
            ddlSender.DataTextField  = "Acnt_Name";
            ddlSender.DataValueField = "Acnt_Idno";
            ddlSender.DataBind();
            ddlSender.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlTruckNo.DataSource     = TruckNolst;
            ddlTruckNo.DataTextField  = "Lorry_No";
            ddlTruckNo.DataValueField = "Lorry_Idno";
            ddlTruckNo.DataBind();
            ddlTruckNo.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlFromCity.DataSource     = ToCity;
            ddlFromCity.DataTextField  = "city_name";
            ddlFromCity.DataValueField = "city_idno";
            ddlFromCity.DataBind();
            ddlFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlToCity.DataSource     = ToCity;
            ddlToCity.DataTextField  = "city_name";
            ddlToCity.DataValueField = "city_idno";
            ddlToCity.DataBind();
            ddlToCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlCompFromCity.DataSource     = ToCity;
            ddlCompFromCity.DataTextField  = "city_name";
            ddlCompFromCity.DataValueField = "city_idno";
            ddlCompFromCity.DataBind();
            ddlCompFromCity.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));

            ddlCompFromCity.DataSource     = ToCityComp;
            ddlCompFromCity.DataTextField  = "City_Name";
            ddlCompFromCity.DataValueField = "City_Idno";
            ddlCompFromCity.DataBind();
            ddlCompFromCity.Items.Insert(0, new ListItem("--Select--", "0"));
        }