Пример #1
0
        protected void dpAgentProductType_OnSelectedIndexChanged(object sender, EventArgs e)
        {
            DS = new DataSet();

            //  DS = BindCommanData.BindTypeDropDwon("Products.productId", "ProductName+' '+Productcode as product", " TypeMaster ", " BindSlab", " TypeMaster.TypeID = BindSlab.TypeID ", "BindSlab.AgentID = 110 ");

            DS = BindCommanData.BindTypeDropDwon("Products.productId", "Products.ProductName+' '+Products.Productcode as product", "Products", "BindSlab", "Products.TypeID = Bindslab.TypeID", "Products.TypeID =" + Convert.ToInt32(dpAgentProductType.SelectedItem.Value) + " and BindSlab.AgentID =" + Convert.ToInt32(dpAgent.SelectedItem.Value) + " and BindSlab.SlabID = Products.SlabID order by Products.ProductName");

            // DS = BindCommanData.BindCommanDropDwon("Products.ProductID", "Commodity.CommodityName+' '+Products.ProductName as product", "Commodity, Products", "   Products.CommodityID = Commodity.CommodityID");

            dpAgentProductdetaisl.DataSource = DS;
            dpAgentProductdetaisl.DataBind();
            dpAgentProductdetaisl.Items.Insert(0, new ListItem("--Select Product  --", "0"));
            dpAgentProductdetaisl.Focus();
            upMain.Update();
        }
Пример #2
0
        private void BindDropDown()
        {
            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("VendorId as ID", "VendorCode +' ' +VendorName as Name", "Prchs_Vendor", "IsActive = 1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVendor.DataSource = DS;
                dpVendor.DataBind();
                dpVendor.Items.Insert(0, new ListItem("--Select Vendor--", "0"));
            }

            DS = BindCommanData.BindTypeDropDwon("RequestDetailsId as ID", "ItemName as Name", "Prchs_RequestDetails", "Prchs_Request", "Prchs_RequestDetails.RequestId = Prchs_Request.RequestId join Prchs_Items  on Prchs_RequestDetails.ItemId = Prchs_Items.ItemId", "Prchs_Request.ReqStatus = 'Approved' and Prchs_RequestDetails.POStat = 0");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpItem.DataSource = DS;
                dpItem.DataBind();
                dpItem.Items.Insert(0, new ListItem("--Select Item--", "0"));
            }
        }
Пример #3
0
        protected void dpVehicleNo_IndexChanged(object sender, EventArgs e)
        {
            DS = new DataSet();

            DS = BindCommanData.BindTypeDropDwon("ID ", "CONFIGVALUE  as Name  ", "CONFIGMASTER", "tblTransportMaster", "CONFIGMASTER.ID = tblTransportMaster.Veh_InsProvider", "CONFIGMASTER.ISACTIVE=1 and CONFIGNAME='Transport' and CONFIGKEY='Insuranceprovider'and TM_Id=" + Convert.ToInt32(dpVehicleNo.SelectedItem.Value));

            dpVeh_InsProvider.DataSource = DS;
            dpVeh_InsProvider.DataBind();
            dpVeh_InsProvider.Items.Insert(0, new ListItem("--Select Insurance Provider  --", "0"));
            dpVeh_InsProvider.Focus();

            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("TM_Id ", "Veh_InsPolicyNo  as Name  ", "tblTransportMaster", "ISACTIVE=1 and TM_Id=" + Convert.ToInt32(dpVehicleNo.SelectedItem.Value));
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVeh_InsPolicyNo.DataSource = DS;
                dpVeh_InsPolicyNo.DataBind();
                dpVeh_InsPolicyNo.Items.Insert(0, new ListItem("--Select Insurance Policy Number  --", "0"));
                dpVeh_InsPolicyNo.Focus();
            }
        }
Пример #4
0
        public void BindDropDwon()
        {
            int boothid = GlobalInfo.CurrentbothID;

            DS = new DataSet();
            //  DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1 ");
            DS = BindCommanData.BindTypeDropDwon("RouteMaster.RouteID", "RouteMaster.RouteCode+' '+RouteMaster.RouteName as Name  ", "RouteMaster", "AgentMaster", "RouteMaster.RouteID = AgentMaster.RouteID", "RouteMaster.IsArchive=1  and AgentID = " + boothid);
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpagentRoute.DataSource = DS;
                dpagentRoute.DataBind();
                //dpagentRoute.Items.Insert(0, new ListItem("--Select Agent Route  --", "0"));
            }

            DS = BindCommanData.BindCommanDropDwon("AgentID", "AgentCode+' '+AgentName as Name", "AgentMaster", "IsArchive=0 and AgentID = " + boothid);
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpAgent.DataSource = DS;
                dpAgent.DataBind();
                // dpAgent.Items.Insert(0, new ListItem("--Select Booth  --", "0"));
            }
            DS.Clear();
            DS = BindCommanData.BindCommanDropDwon("CategoryId", "CategoryName", "Category", "IsActive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpBrand.DataSource = DS;
                dpBrand.DataBind();
                dpBrand.Items.Insert(0, new ListItem("--Select Brand  --", "0"));
            }
            DS.Clear();
            DS = BindCommanData.BindCommanDropDwon("TypeID", "TypeName", "TypeMaster", "IsArchive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpAgentProductType.DataSource = DS;
                dpAgentProductType.DataBind();
                dpAgentProductType.Items.Insert(0, new ListItem("--Select Product Type  --", "0"));
            }
        }