コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                EmployeeData empData = new EmployeeData();
                DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpRoute.DataSource = DS;
                    dpRoute.DataBind();
                    dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));
                }

                //DS = BindCommanData.BindCommanDropDwon("EmployeeID", "EmployeeCode+' '+EmployeeName as Name", "employeemaster", "IsArchive=0");
                //if (!Comman.Comman.IsDataSetEmpty(DS))
                //{
                //    dpAgentSelasEMployee.DataSource = DS;
                //    dpAgentSelasEMployee.DataBind();
                //    dpAgentSelasEMployee.Items.Insert(0, new ListItem("Agent Sales Person", "0"));


                //}
                txtDate.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
            }
        }
コード例 #2
0
        public void BindDropdown()
        {
            DS = BindCommanData.BindCommanDropDwon("SupplierID ", "SupplierCode +' '+SupplierName as Name  ", "Proc_MilkSuppliersProfile", "IsActive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpSupplier.DataSource = DS;
                dpSupplier.DataBind();
                dpSupplier.Items.Insert(0, new ListItem("--Select Supplier  --", "0"));
            }

            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "BankName as Name", "BankDetails", "ID is not null");
            dpBankName.DataSource = DS;
            dpBankName.DataBind();
            dpBankName.Items.Insert(0, new ListItem("--Select Bank Name--", "0"));

            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "IFSCCode as Name", "BankDetails", "ID is not null");
            dpIfscCode.DataSource = DS;
            dpIfscCode.DataBind();
            dpIfscCode.Items.Insert(0, new ListItem("--Select Ifsc Code--", "0"));
            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "Proc_MilkCollectionRoute", "IsActive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DS = BindCommanData.BindCommanDropDwon("EmployeeID ", "EmployeeCode +' '+EmployeeName as Name  ", "EmployeeMaster", "IsActive=1 and (Designation='Sales Man' or Designation = 'Driver') ");
                //DS = BindCommanData.BindCommanDropDwon("EmployeeID", "EmployeeCode+' '+EmployeeName as Name", "employeemaster", "IsArchive=0 and (Designation='Sales Man')");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpSalesMan.DataSource = DS;
                    dpSalesMan.DataBind();
                    dpSalesMan.Items.Insert(0, new ListItem("All SalesMan", "0"));
                }
            }

            if (Context.Session != null && Context.Session.IsNewSession == true &&
                Page.Request.Headers["Cookie"] != null &&
                Page.Request.Headers["Cookie"].IndexOf("ASP.NET_SessionId") >= 0)
            {
                // session has timed out, log out the user
                if (Page.Request.IsAuthenticated)
                {
                    FormsAuthentication.SignOut();
                }
                // redirect to timeout page
                Page.Response.Redirect("/Authentication/LoginT.aspx");
            }
        }
コード例 #4
0
        public void BindDropDwon()
        {
            DS = BindCommanData.BindCommanDropDwon("id as VahicleID", "VehicleType as VehicleName", "Proc_VehicleType", "id is not null  Order by VehicleType Asc");
            dpVehicleType.DataSource = DS;
            dpVehicleType.DataBind();
            dpVehicleType.Items.Insert(0, new ListItem("--Select Vehicle Model--", "0"));

            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "BankName as Name", "BankDetails", "ID is not null");
            dpBankName.DataSource = DS;
            dpBankName.DataBind();
            dpBankName.Items.Insert(0, new ListItem("--Select Bank Name--", "0"));

            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "IFSCCode as Name", "BankDetails", "ID is not null");
            dpIfscCode.DataSource = DS;
            dpIfscCode.DataBind();
            dpIfscCode.Items.Insert(0, new ListItem("--Select Ifsc Code--", "0"));

            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "Proc_MilkCollectionRoute", "IsActive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));
            }
        }
コード例 #5
0
ファイル: Items.aspx.cs プロジェクト: amolsm/Nanjil2
        private void loadListBox(string rackid)
        {
            DS = new DataSet();

            DS = BindCommanData.BindCommanDropDwon("RackSectionId", "RackSectionName as Name", "Prchs_RackSections", "RackId =" + rackid);
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                lbSection.DataSource = DS;

                lbSection.DataBind();
                //dpSection.Items.Insert(0, new ListItem("--Select Section--", "0"));
            }

            Rack rack = new Rack();

            purchaseData  = new PurchaseData();
            rack.RackId   = Convert.ToInt32(rackid);
            rack.RackName = string.Empty;
            rack.Flag     = 10; //Get assigned sections by rackid
            DS            = purchaseData.GetRackList(rack);
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                lblAssignedSecs.Text = "Assigned Sections : " + DS.Tables[0].Rows[0]["SecNames"].ToString();
            }
        }
コード例 #6
0
ファイル: AddRoute.aspx.cs プロジェクト: amolsm/Nanjil2
 public void BindDropDwon()
 {
     DS = BindCommanData.BindCommanDropDwon("EmployeeID", "EmployeeCode+' '+EmployeeName as Name", "employeemaster", "IsArchive=0");
     dpASOID.DataSource = DS;
     dpASOID.DataBind();
     dpASOID.Items.Insert(0, new ListItem("--Select ASOID  --", "0"));
 }
コード例 #7
0
        protected void BindDropDown()
        {
            RouteData routeData = new RouteData();

            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "Proc_MilkCollectionRoute", "IsActive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));

                dpRoute1.DataSource = DS;
                dpRoute1.DataBind();
                dpRoute1.Items.Insert(0, new ListItem("--Select All Route  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("VehicleMasterID ", "VehicleNo", "Proc_VehicleMaster", "IsActive=1  Order by VehicleNo Asc");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVehicleNo.DataSource = DS;
                dpVehicleNo.DataBind();
                dpVehicleNo.Items.Insert(0, new ListItem("--Select Vehicle No.  --", "0"));

                dpVehicleNo1.DataSource = DS;
                dpVehicleNo1.DataBind();
                dpVehicleNo1.Items.Insert(0, new ListItem("--Select All Vehicle  --", "0"));
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpRoute.DataSource = DS;
                    dpRoute.DataBind();
                    dpRoute.Items.Insert(0, new ListItem("--All Route  --", "0"));
                }

                DS = BindCommanData.BindCommanDropDwon("CategoryId", "CategoryName as Name", "Category", "IsActive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpBrand.DataSource = DS;
                    dpBrand.DataBind();
                    dpBrand.Items.Insert(0, new ListItem("--All Brand--", "0"));
                }

                txtStart1Date.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
                txtEnd1Date.Text   = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
                txtStart2Date.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
                txtEnd2Date.Text   = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
            }
        }
コード例 #9
0
        public void BindDropDown()
        {
            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "Proc_MilkCollectionRoute", "IsActive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--All Route  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "BankName as Name", "BankDetails", "ID is not null");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpBankName.DataSource = DS;
                dpBankName.DataBind();
                dpBankName.Items.Insert(0, new ListItem("--All Bank Name--", "0"));
            }

            DS = BindCommanData.BindCommanDropDwonDistinct("ID", "IFSCCode as Name", "BankDetails", "ID is not null");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpIfscCode.DataSource = DS;
                dpIfscCode.DataBind();
                dpIfscCode.Items.Insert(0, new ListItem("--All Ifsc Code--", "0"));
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                EmployeeData empData = new EmployeeData();
                DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpRoute.DataSource = DS;
                    dpRoute.DataBind();
                    dpRoute.Items.Insert(0, new ListItem("--All  Route  --", "0"));
                }

                DS = BindCommanData.BindCommanDropDwon("AgentID", "AgentCode+' '+AgentName as Name", "AgentMaster", "IsArchive=0 and SchemeAmount!=0.00 and Agensytype='Agency' Order by AgentCode");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpAgent.DataSource = DS;
                    dpAgent.DataBind();
                    dpAgent.Items.Insert(0, new ListItem("--All Agency  --", "0"));
                }

                txtStartDate.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
                txtEndDate.Text   = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
            }
        }
コード例 #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpRoute.DataSource = DS;
             dpRoute.DataBind();
             dpRoute.Items.Insert(0, new ListItem("-All Route-", "0"));
         }
         DS = BindCommanData.BindCommanDropDwon("TypeID", "TypeName as Name", "TypeMaster", "IsArchive=1 ");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpType.DataSource = DS;
             dpType.DataBind();
             dpType.Items.Insert(0, new ListItem("--All Product Type  --", "0"));
         }
         DS = BindCommanData.BindCommanDropDwon("CommodityID", "CommodityName as Name", "Commodity", "IsArchive=0 ");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpCommodity.DataSource = DS;
             dpCommodity.DataBind();
             dpCommodity.Items.Insert(0, new ListItem("--All Commodity Type  --", "0"));
         }
         txtStartDate.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
         txtEndDate.Text   = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
     }
 }
コード例 #12
0
        private void BindDropDwon()
        {
            DataSet DS = new DataSet();


            DS = BindCommanData.BindCommanDropDwon("DeptId as ID", "Dept_Name as Name", "tblDepartment", "Dept_Name is not null");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpDepartment.DataSource = DS;
                dpDepartment.DataBind();
                dpDepartment.Items.Insert(0, new ListItem("--Select Department--", "0"));
            }

            ////DS = BindCommanData.GetEmployeeByUserID(GlobalInfo.Userid);
            ////if (!Comman.Comman.IsDataSetEmpty(DS))
            ////{
            ////    txtEmployee.Text = DS.Tables[0].Rows[0]["EmployeeCode"].ToString() + " "+ DS.Tables[0].Rows[0]["EmployeeName"].ToString();
            ////}

            DS = BindCommanData.BindCommanDropDwon("ItemCategoryId as ID", "ItemCategoryName as Name", "Prchs_ItemCategory", "IsActive = 1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpCategory.DataSource = DS;
                dpCategory.DataBind();
                dpCategory.Items.Insert(0, new ListItem("--Select Caterogy--", "0"));
            }
        }
コード例 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DS = new DataSet();
                DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpRoute.DataSource = DS;
                    dpRoute.DataBind();
                    dpRoute.Items.Insert(0, new ListItem("--All Route--", "0"));
                }

                txtStartDate.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
                txtEndDate.Text   = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
            }
            if (Context.Session != null && Context.Session.IsNewSession == true &&
                Page.Request.Headers["Cookie"] != null &&
                Page.Request.Headers["Cookie"].IndexOf("ASP.NET_SessionId") >= 0)
            {
                // session has timed out, log out the user
                if (Page.Request.IsAuthenticated)
                {
                    FormsAuthentication.SignOut();
                }
                // redirect to timeout page
                Page.Response.Redirect("/Authentication/LoginT.aspx");
            }
        }
コード例 #14
0
        public void BindDropDwon()
        {
            DS = BindCommanData.BindCommanDropDwon("TM_Id", "VehicleNo", "tblTransportMaster", "IsActive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVehicleNo.DataSource = DS;
                dpVehicleNo.DataBind();
                dpVehicleNo.Items.Insert(0, new ListItem("--Select Vehicle Number--", "0"));
            }


            DS = BindCommanData.BindCommanDropDwon("ID ", "CONFIGVALUE  as Name  ", "CONFIGMASTER", "ISACTIVE=1 and CONFIGNAME='Transport' and CONFIGKEY='Insuranceprovider'");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVeh_InsProvider.DataSource = DS;
                dpVeh_InsProvider.DataBind();
                dpVeh_InsProvider.Items.Insert(0, new ListItem("--Select Insurance Provider  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("TM_Id ", "Veh_InsPolicyNo  as Name  ", "tblTransportMaster", "ISACTIVE=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVeh_InsPolicyNo.DataSource = DS;
                dpVeh_InsPolicyNo.DataBind();
                dpVeh_InsPolicyNo.Items.Insert(0, new ListItem("--Select Insurance Policy Number  --", "0"));
            }
        }
コード例 #15
0
ファイル: BillSequence.aspx.cs プロジェクト: amolsm/Nanjil2
 protected void chkEmp_CheckedChanged(object sender, EventArgs e)
 {
     if (chkEmp.Checked)
     {
         DS = BindCommanData.BindCommanDropDwon("'E' + convert(nvarchar(max),EmployeeID) as EmployeeID ", " EmployeeCode +' '+EmployeeName as Name  ", "EmployeeMaster", "IsActive = 1");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             FirstList.DataValueField = "EmployeeID";
             FirstList.DataTextField  = "Name";
             FirstList.DataSource     = DS;
             FirstList.DataBind();
             FirstList.Rows = FirstList.Items.Count;
             //FirstList.Items.Insert(0, new ListItem("--Select Route--", "0"));
         }
         else
         {
             FirstList.Items.Clear();
         }
     }
     else
     {
         FirstList.Items.Clear();
     }
     dpRouteTemp.ClearSelection();
 }
コード例 #16
0
        public void BindDropDownList()
        {
            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--All Route--", "0"));
            }

            DS = BindCommanData.BindCommanDropDwon("TypeID", "TypeName as Name", "TypeMaster", "IsArchive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpProductType.DataSource = DS;
                dpProductType.DataBind();
                dpProductType.Items.Insert(0, new ListItem("--Select Product Type  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("SlabID", "SlabName as Name", "SlabMaster", "IsArchive=0 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpSlab.DataSource = DS;
                dpSlab.DataBind();
                dpSlab.Items.Insert(0, new ListItem("-- All Slab --", "0"));
            }
        }
コード例 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         EmployeeData empData = new EmployeeData();
         DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpRoute.DataSource = DS;
             dpRoute.DataBind();
             dpRoute.Items.Insert(0, new ListItem("--All Route  --", "0"));
         }
         DS = BindCommanData.BindCommanDropDwon("AgentID", "AgentCode+' '+AgentName as Name", "AgentMaster", "IsArchive=0  Order by AgentCode");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpAgent.DataSource = DS;
             dpAgent.DataBind();
             dpAgent.Items.Insert(0, new ListItem("-All Agency-", "0"));
         }
         DS = BindCommanData.BindCommanDropDwon("CategoryId", "CategoryName as Name", "Category", "IsActive=1");
         if (!Comman.Comman.IsDataSetEmpty(DS))
         {
             dpBrand.DataSource = DS;
             dpBrand.DataBind();
             dpBrand.Items.Insert(0, new ListItem("--Select Brand--", "0"));
         }
     }
 }
コード例 #18
0
        public void BindDropDwon()
        {
            DS = new DataSet();
            //DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1 ");
            //if (!Comman.Comman.IsDataSetEmpty(DS))
            //{
            //    dpagentRoute.DataSource = DS;
            //    dpagentRoute.DataBind();
            //    dpagentRoute.Items.Insert(0, new ListItem("--Select Agent Route  --", "0"));



            //}

            DS.Clear();
            DS = BindCommanData.BindCommanDropDwon("AgentID", "AgentCode+' '+AgentName as Name", "AgentMaster", "IsArchive=0 and Isactive=1 and Agensytype='Agency' Order by AgentCode");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpAgent.DataSource = DS;
                dpAgent.DataBind();
                dpAgent.Items.Insert(0, new ListItem("--Select Agent  --", "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"));
            }
        }
コード例 #19
0
        protected void dpEmployeeProducttype_IndexChanged(object sender, EventArgs e)
        {
            DS = new DataSet();

            //string ptype = Convert.ToString(dpEmployeeProductType.SelectedItem.Text);
            int    ptype = Convert.ToInt32(dpEmployeeProductType.SelectedItem.Value);
            double count = string.IsNullOrEmpty(hfTotalCansume.Value) ? 0 : Convert.ToDouble(hfTotalCansume.Value);

            if (count > 30 && ptype == 1)
            {
                DS = BindCommanData.BindCommanDropDwon("productId", "ProductName+' '+Productcode as product", "Products", "   typeID=" + Convert.ToInt32(dpEmployeeProductType.SelectedItem.Value) + " and   IsArchive=0 and SlabID = 3 order by ProductName");
                //DS = BindCommanData.BindCommanDropDwon("Products.ProductID", "Commodity.CommodityName+' '+Products.ProductName as product", "Commodity, Products", "   Products.CommodityID = Commodity.CommodityID");

                dpEmployeeProductDetails.DataSource = DS;
                dpEmployeeProductDetails.DataBind();
                dpEmployeeProductDetails.Items.Insert(0, new ListItem("--Select Product  --", "0"));
                dpEmployeeProductDetails.Focus();
            }
            else
            {
                DS = BindCommanData.BindCommanDropDwon("productId", "ProductName+' '+Productcode as product", "Products", "   typeID=" + Convert.ToInt32(dpEmployeeProductType.SelectedItem.Value) + " and   IsArchive=0 and SlabID = 2 order by ProductName");
                //DS = BindCommanData.BindCommanDropDwon("Products.ProductID", "Commodity.CommodityName+' '+Products.ProductName as product", "Commodity, Products", "   Products.CommodityID = Commodity.CommodityID");

                dpEmployeeProductDetails.DataSource = DS;
                dpEmployeeProductDetails.DataBind();
                dpEmployeeProductDetails.Items.Insert(0, new ListItem("--Select Product  --", "0"));
                dpEmployeeProductDetails.Focus();
            }

            {
            }

            upMain.Update();
        }
コード例 #20
0
 public void BindDropDownList()
 {
     DS = BindCommanData.BindCommanDropDwon("id as VahicleID", "VehicleType as VehicleName", "Proc_VehicleType", "id is not null  Order by VehicleType Asc");
     dpVehicleType.DataSource = DS;
     dpVehicleType.DataBind();
     dpVehicleType.Items.Insert(0, new ListItem("--Select Vehicle Model--", "0"));
 }
コード例 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                EmployeeData empData = new EmployeeData();
                DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpRoute.DataSource = DS;
                    dpRoute.DataBind();
                    dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));
                }

                DS = BindCommanData.BindCommanDropDwon("EmployeeID", "EmployeeCode+' '+EmployeeName as Name", "employeemaster", "IsArchive=0 and (Designation='Sales Man' or Designation='Driver')");
                if (!Comman.Comman.IsDataSetEmpty(DS))
                {
                    dpAgentSelasEMployee.DataSource = DS;
                    dpAgentSelasEMployee.DataBind();
                    dpAgentSelasEMployee.Items.Insert(0, new ListItem("Agent Sales Person", "0"));
                }
                txtDate.Text = Convert.ToString(DateTime.Now.ToString("yyyy-MM-dd"));
            }
            if (Context.Session != null && Context.Session.IsNewSession == true &&
                Page.Request.Headers["Cookie"] != null &&
                Page.Request.Headers["Cookie"].IndexOf("ASP.NET_SessionId") >= 0)
            {
                // session has timed out, log out the user
                if (Page.Request.IsAuthenticated)
                {
                    FormsAuthentication.SignOut();
                }
                // redirect to timeout page
                Page.Response.Redirect("/Authentication/LoginT.aspx");
            }
        }
コード例 #22
0
        public void BindDropDwon()
        {
            DS = BindCommanData.BindCommanDropDwon("TM_Id", "VehicleNo", "tblTransportMaster", "IsActive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpVehicleNo.DataSource = DS;
                dpVehicleNo.DataBind();
                dpVehicleNo.Items.Insert(0, new ListItem("--Select Vehicle Number--", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("ID ", "CONFIGVALUE  as Name  ", "CONFIGMASTER", "ISACTIVE=1 and CONFIGNAME='Transport' and CONFIGKEY='FuelType'");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpFuelType.DataSource = DS;
                dpFuelType.DataBind();
                dpFuelType.Items.Insert(0, new ListItem("--Select Fuel Type  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("Id", "fuelpumpname", "Tr_Fuelpumpmaster", "IsActive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRegisterpump.DataSource     = DS;
                dpRegisterpump.DataTextField  = "fuelpumpname";
                dpRegisterpump.DataValueField = "Id";
                dpRegisterpump.DataBind();
                dpRegisterpump.Items.Insert(0, new ListItem("--Select Dealer--", "0"));
            }

            DS = BindCommanData.BindCommanDropDwon("ID ", "CONFIGVALUE  as Name  ", "CONFIGMASTER", "ISACTIVE=1 and CONFIGNAME='Transport' and CONFIGKEY='VehicleType'");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpOperations.DataSource = DS;
                dpOperations.DataBind();
                dpOperations.Items.Insert(0, new ListItem("--Select Operations Type  --", "0"));
            }
        }
コード例 #23
0
ファイル: dash1.aspx.cs プロジェクト: amolsm/Nanjil2
        protected void Timer1_Tick(object sender, EventArgs e)
        {
            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("count(*) as id", "count(*) as Name", "Prchs_Indent", "Delivered = 0");

            lblNewIndentCount.Text = DS.Tables[0].Rows[0]["Name"].ToString();
        }
コード例 #24
0
        public void BindDropDwon()
        {
            DS = new DataSet();
            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1 ");
            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 Agensytype='Booth'");
            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"));
            }
        }
コード例 #25
0
        public void BindDropDwon()
        {
            DataSet DS = new DataSet();

            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "routeMaster", "IsArchive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpRoute.DataSource = DS;
                dpRoute.DataBind();
                dpRoute.Items.Insert(0, new ListItem("--All Route  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("CategoryId", "CategoryName as Name", "Category", "IsActive=1");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpBrand.DataSource = DS;
                dpBrand.DataBind();
                dpBrand.Items.Insert(0, new ListItem("--All Brand--", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("TypeID", "TypeName as Name", "TypeMaster", "IsArchive=1 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpType.DataSource = DS;
                dpType.DataBind();
                dpType.Items.Insert(0, new ListItem("--All Product Type  --", "0"));
            }
            DS = BindCommanData.BindCommanDropDwon("CommodityID", "CommodityName as Name", "Commodity", "IsArchive=0 ");
            if (!Comman.Comman.IsDataSetEmpty(DS))
            {
                dpCommodity.DataSource = DS;
                dpCommodity.DataBind();
                dpCommodity.Items.Insert(0, new ListItem("--All Commodity   --", "0"));
            }
        }
コード例 #26
0
 protected void BindDropDwon()
 {
     DS = new DataSet();
     DS = BindCommanData.BindCommanDropDwon("RouteID", "RouteCode +':  ' +RouteName as Name", "RouteMaster", "IsArchive =1");
     dpRoute.DataSource = DS;
     dpRoute.DataBind();
     dpRoute.Items.Insert(0, new ListItem("--Select Route--", "0"));
 }
コード例 #27
0
 protected void BindDropDwon()
 {
     DS = new DataSet();
     DS = BindCommanData.BindCommanDropDwon("ShiftId", "ShiftName as Name", "ShiftMaster", "IsActive =1");
     dpShiftDetails.DataSource = DS;
     dpShiftDetails.DataBind();
     dpShiftDetails.Items.Insert(0, new ListItem("--Select Shift--", "0"));
 }
コード例 #28
0
        protected void dpCenter_SelectedIndexChanged(object sender, EventArgs e)
        {
            dpRoute.ClearSelection();
            DS = BindCommanData.BindCommanDropDwon("RouteID ", "RouteCode +' '+RouteName as Name  ", "Proc_MilkCollectionRoute", "IsActive=1 and CenterID=" + dpCenter.SelectedItem.Value);

            dpRoute.DataSource = DS;
            dpRoute.DataBind();
            dpRoute.Items.Insert(0, new ListItem("--Select Route  --", "0"));
        }
コード例 #29
0
        protected void dpRoute_SelectedIndexChanged(object sender, EventArgs e)
        {
            dpSupplier.ClearSelection();
            DS = BindCommanData.BindCommanDropDwon("SupplierID ", "SupplierCode +' '+SupplierName as Name  ", "Proc_MilkSuppliersProfile", "IsActive=1 and RouteId=" + dpRoute.SelectedItem.Value);

            dpSupplier.DataSource = DS;
            dpSupplier.DataBind();
            dpSupplier.Items.Insert(0, new ListItem("--Select Supplier  --", "0"));
        }
コード例 #30
0
 protected void dpVehicleNo_SelectedIndexChanged(object sender, EventArgs e)
 {
     DS = BindCommanData.BindCommanDropDwon("VehicleMasterID ", "DriverName", "Proc_VehicleMaster", "IsActive=1 and VehicleMasterID=" + dpVehicleNo.SelectedItem.Value);
     if (!Comman.Comman.IsDataSetEmpty(DS))
     {
         var dname = DS.Tables[0].AsEnumerable().Select(r => r.Field <string>("DriverName")).ToList();
         txtDriverName.Text = dname[0].ToString();
     }
 }