Ejemplo n.º 1
0
        private void BindDropdown()
        {
            BindDropdownDAL obj        = new BindDropdownDAL();
            var             Transpoter = obj.BindTranspoter();

            ddlTransportName.DataSource     = Transpoter;
            ddlTransportName.DataTextField  = "Acnt_Name";
            ddlTransportName.DataValueField = "Acnt_Idno";
            ddlTransportName.DataBind();
            ddlTransportName.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select--", "0"));
        }
        private void BindDropdown()
        {
            BindDropdownDAL obj         = new BindDropdownDAL();
            var             senderLst   = obj.BindSender();
            var             receiverLst = obj.BindSender();
            var             TruckNolst  = obj.BindTruckNo();
            var             ToCity      = obj.BindAllToCity();
            var             Agent       = obj.BindAgent();
            var             bank        = obj.BindBank();
            var             itemname    = obj.BindItemName();
            var             UnitName    = obj.BindUnitName();
            var             Transpoter  = obj.BindTranspoter();

            obj = null;

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

            ddlReciverName.DataSource     = receiverLst;
            ddlReciverName.DataTextField  = "acnt_name";
            ddlReciverName.DataValueField = "acnt_idno";
            ddlReciverName.DataBind();
            ddlReciverName.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"));

            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"));

            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"));

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