Exemple #1
0
    protected void fillstore()
    {
        ddlschool.Items.Clear();
        filterschool.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlschool.DataSource     = ds;
        ddlschool.DataTextField  = "Name";
        ddlschool.DataValueField = "WareHouseId";

        ddlschool.DataBind();


        filterschool.DataSource     = ds;
        filterschool.DataTextField  = "Name";
        filterschool.DataValueField = "WareHouseId";

        filterschool.DataBind();
        //ddlStore.Items.Insert(0, "Select");
        filterschool.Items.Insert(0, "All");
        filterbuilding.Items.Insert(0, "All");
        ViewState["cd"] = "1";
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        //if (dteeed.Rows.Count > 0)
        //{
        //    ddlschool.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        //    filterschool.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        //}
    }
Exemple #2
0
    protected void fillstore()
    {
        DropDownList1.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();



        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            DropDownList1.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }

        DropDownList3.DataSource     = ds;
        DropDownList3.DataTextField  = "Name";
        DropDownList3.DataValueField = "WareHouseId";
        DropDownList3.DataBind();

        DropDownList3.Items.Insert(0, "All");
        DropDownList3.Items[0].Value = "0";
    }
    protected void fillstore()
    {
        ddlschool.Items.Clear();
        filterschool.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlschool.DataSource     = ds;
        ddlschool.DataTextField  = "Name";
        ddlschool.DataValueField = "WareHouseId";

        ddlschool.DataBind();


        filterschool.DataSource     = ds;
        filterschool.DataTextField  = "Name";
        filterschool.DataValueField = "WareHouseId";

        filterschool.DataBind();

        filterschool.Items.Insert(0, "All");
        filterbuilding.Items.Insert(0, "All");
        filterfloor.Items.Insert(0, "All");
        filterroomtype.Items.Insert(0, "All");

        ViewState["cd"] = "1";
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();
    }
    protected void fillstore()
    {
        ddlSchoolName.SelectedIndex = 0;
        ddlSchoolName.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlSchoolName.DataSource     = ds;
        ddlSchoolName.DataTextField  = "Name";
        ddlSchoolName.DataValueField = "WareHouseId";
        ddlSchoolName.DataBind();
        //ddlStore.Items.Insert(0, "Select");

        ddlSchoolName_Search.Items.Clear();
        DataTable ds1 = ClsStore.SelectStorename();

        ddlSchoolName_Search.DataSource     = ds;
        ddlSchoolName_Search.DataTextField  = "Name";
        ddlSchoolName_Search.DataValueField = "WareHouseId";
        ddlSchoolName_Search.DataBind();

        ddlSchoolName_Search.Items.Insert(0, "All");
        ddlSchoolName_Search.Items[0].Value = "0";

        // ViewState["cd"] = "1";
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        //if (dteeed.Rows.Count > 0)
        //{
        //    ddlSchoolName.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        //}
    }
    protected void fillstore()
    {
        ddlwarehouse.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlwarehouse.DataSource     = ds;
        ddlwarehouse.DataTextField  = "Name";
        ddlwarehouse.DataValueField = "WareHouseId";
        ddlwarehouse.DataBind();
        //ddlstore.Items.Insert(0, "Select");

        ViewState["cd"] = "1";
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlwarehouse.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
        ddlbussnessfilter.DataSource     = ds;
        ddlbussnessfilter.DataTextField  = "Name";
        ddlbussnessfilter.DataValueField = "WareHouseId";
        ddlbussnessfilter.DataBind();
        ddlbussnessfilter.Items.Insert(0, "All");
        ddlbussnessfilter.Items[0].Value = "0";
    }
    protected void fillwarehouse()
    {
        //string str1 = "select WareHouseId,Name from WareHouseMaster WHERE comid='" + Session["Comid"].ToString() + "' And Status='1' ";

        //DataTable ds1 = new DataTable();
        //SqlDataAdapter da = new SqlDataAdapter(str1, con);
        //da.Fill(ds1);
        //if (ds1.Rows.Count > 0)
        //{
        //    ddlwarehouse.DataSource = ds1;
        //    ddlwarehouse.DataTextField = "Name";
        //    ddlwarehouse.DataValueField = "WarehouseId";
        //    ddlwarehouse.DataBind();
        //}
        ddlwarehouse.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        if (ds.Rows.Count > 0)
        {
            ddlwarehouse.DataSource     = ds;
            ddlwarehouse.DataTextField  = "Name";
            ddlwarehouse.DataValueField = "WareHouseId";
            ddlwarehouse.DataBind();


            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlwarehouse.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
        }
    }
    protected void fillwarehouse()
    {
        //string str1 = "SELECT Distinct WareHouseId,Name  FROM WareHouseMaster inner join EmployeeWarehouseRights on EmployeeWarehouseRights.Whid=WareHouseMaster.WareHouseId where comid = '" + Session["Comid"].ToString() + "' and WareHouseMaster.Status='1' and EmployeeWarehouseRights.AccessAllowed='True' order by name asc";

        //DataTable ds1 = new DataTable();
        //SqlDataAdapter da = new SqlDataAdapter(str1, con);
        //da.Fill(ds1);
        //if (ds1.Rows.Count > 0)
        //{
        //    ddlwarehouse.DataSource = ds1;
        //    ddlwarehouse.DataTextField = "Name";
        //    ddlwarehouse.DataValueField = "WarehouseId";
        //    ddlwarehouse.DataBind();
        //}
        ddlwarehouse.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        if (ds.Rows.Count > 0)
        {
            ddlwarehouse.DataSource     = ds;
            ddlwarehouse.DataTextField  = "Name";
            ddlwarehouse.DataValueField = "WareHouseId";
            ddlwarehouse.DataBind();


            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlwarehouse.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
        }

        fillEmployee();
    }
    protected void Fillwarehouse()
    {
        ddlstore.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlstore.DataSource     = ds;
        ddlstore.DataTextField  = "Name";
        ddlstore.DataValueField = "WareHouseId";
        ddlstore.DataBind();

        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlstore.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, "All");

        DropDownList2.DataSource     = null;
        DropDownList2.DataTextField  = "Departmentname";
        DropDownList2.DataValueField = "id";
        DropDownList2.DataBind();
        DropDownList2.Items.Insert(0, "All");
    }
Exemple #9
0
    protected void fillupdatestore()
    {
        ddlupdatebusiness.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlupdatebusiness.DataSource     = ds;
        ddlupdatebusiness.DataTextField  = "Name";
        ddlupdatebusiness.DataValueField = "WareHouseId";
        ddlupdatebusiness.DataBind();
    }
    protected void fillstoreprofile()
    {
        ddlWarehouse.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlWarehouse.DataSource     = ds;
        ddlWarehouse.DataTextField  = "Name";
        ddlWarehouse.DataValueField = "WareHouseId";
        ddlWarehouse.DataBind();
    }
    protected void fillstorewithfilter()
    {
        DropDownList1.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, "All");
        DropDownList1.Items[0].Value = "0";
    }
    protected void fillfilterstore()
    {
        ddlbusifil.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlbusifil.DataSource     = ds;
        ddlbusifil.DataTextField  = "Name";
        ddlbusifil.DataValueField = "WareHouseId";
        ddlbusifil.DataBind();
        ddlbusifil.Items.Insert(0, "All");
        ddlbusifil.Items[0].Value = "0";
    }
    protected void fillwarehouse1()
    {
        ddBusinessfilter.Items.Clear();

        DataTable ds = ClsStore.SelectStorename();

        ddBusinessfilter.DataSource     = ds;
        ddBusinessfilter.DataTextField  = "Name";
        ddBusinessfilter.DataValueField = "WarehouseId";
        ddBusinessfilter.DataBind();
        ddBusinessfilter.Items.Insert(0, "All");
        ddBusinessfilter.Items[0].Value = "0";
    }
Exemple #14
0
    protected void fillstore()
    {
        DataTable ds1 = ClsStore.SelectStorename();

        if (ds1.Rows.Count > 0)
        {
            ddlsearchByStore.DataSource     = ds1;
            ddlsearchByStore.DataTextField  = "Name";
            ddlsearchByStore.DataValueField = "WarehouseId";
            ddlsearchByStore.DataBind();
            ddlsearchByStore.Items.Insert(0, "All");
            ddlsearchByStore.Items[0].Value = "0";
        }
    }
Exemple #15
0
    protected void storefill()
    {
        DataTable dtwh = ClsStore.SelectStorename();

        ddlWarehouse.DataSource     = dtwh;
        ddlWarehouse.DataTextField  = "Name";
        ddlWarehouse.DataValueField = "WareHouseId";
        ddlWarehouse.DataBind();
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlWarehouse.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
Exemple #16
0
    protected void fillware()
    {
        DataTable ds = ClsStore.SelectStorename();

        if (ds.Rows.Count > 0)
        {
            ddlwarehouse.DataSource     = ds;
            ddlwarehouse.DataValueField = "WareHouseId";
            ddlwarehouse.DataTextField  = "Name";

            ddlwarehouse.DataBind();
        }
        //ddlwarehouse.Items.Insert(0, "--Select--");
        //ddlwarehouse.Items[0].Value = "0";
    }
    protected void fillwarehouse()
    {
        ddBusiness.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddBusiness.DataSource     = ds;
        ddBusiness.DataTextField  = "Name";
        ddBusiness.DataValueField = "WareHouseId";
        ddBusiness.DataBind();
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddBusiness.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
    protected void fillwarehouse()
    {
        //string str1 = "select * from WarehouseMaster where comid='" + Session["comid"] + "'and Status='" + 1 + "' order by name";

        //DataTable ds1 = new DataTable();
        //SqlDataAdapter da = new SqlDataAdapter(str1, con);
        //da.Fill(ds1);
        //if (ds1.Rows.Count > 0)
        //{
        //    DropDownList1.DataSource = ds1;
        //    DropDownList1.DataTextField = "Name";
        //    DropDownList1.DataValueField = "WarehouseId";
        //    DropDownList1.DataBind();

        //    ddshorting.DataSource = ds1;
        //    ddshorting.DataTextField = "Name";
        //    ddshorting.DataValueField = "WarehouseId";
        //    ddshorting.DataBind();
        //    ddshorting.Items.Insert(0, "ALL");
        //    DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText("Eplaza Store"));
        //}


        DropDownList1.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();



        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            DropDownList1.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }

        ddshorting.DataSource     = ds;
        ddshorting.DataTextField  = "Name";
        ddshorting.DataValueField = "WarehouseId";
        ddshorting.DataBind();
        ddshorting.Items.Insert(0, "All");
        ddshorting.Items[0].Value = "0";
    }
Exemple #19
0
    protected void addnewfillbusiness()
    {
        DropDownList2.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        DropDownList2.DataSource     = ds;
        DropDownList2.DataTextField  = "Name";
        DropDownList2.DataValueField = "WareHouseId";
        DropDownList2.DataBind();


        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            DropDownList2.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
    protected void Fillwarehouse()
    {
        //string str = "select WareHouseId,Name from WareHouseMaster WHERE comid='" + Session["Comid"].ToString() + "'and [WareHouseMaster].Status='1' order by Name";
        //SqlCommand cmd = new SqlCommand(str, conn);
        //SqlDataAdapter adp = new SqlDataAdapter(cmd);
        //DataSet ds = new DataSet();
        //adp.Fill(ds);
        //ddlstrname.DataSource = ds;
        //ddlstrname.DataTextField = "Name";
        //ddlstrname.DataValueField = "WareHouseId";
        //ddlstrname.DataBind();

        //DropDownList1.DataSource = ds;
        //DropDownList1.DataTextField = "Name";
        //DropDownList1.DataValueField = "WareHouseId";
        //DropDownList1.DataBind();
        //DropDownList1.Items.Insert(0, "ALL");

        ddlstrname.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        ddlstrname.DataSource     = ds;
        ddlstrname.DataTextField  = "Name";
        ddlstrname.DataValueField = "WareHouseId";
        ddlstrname.DataBind();

        //ddlStore.Items.Insert(0, "Select");

        ViewState["cd"] = "1";
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlstrname.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, "All");
    }
Exemple #21
0
    //public void FillProduct()
    //{
    //    string strcln = " SELECT distinct ProductMaster.ProductId,ProductDetail.Active,VersionInfoMaster.VersionInfoId,ProductMaster.ProductName + ' : ' + VersionInfoMaster.VersionInfoName as productversion FROM ProductMaster inner join ProductDetail on ProductDetail.ProductId=ProductMaster.ProductId inner join VersionInfoMaster on VersionInfoMaster.ProductId= ProductMaster.ProductId where ProductDetail.Active='1'  order  by productversion";
    //    SqlCommand cmdcln = new SqlCommand(strcln, PageConn.licenseconn());
    //    DataTable dtcln = new DataTable();
    //    SqlDataAdapter adpcln = new SqlDataAdapter(cmdcln);
    //    adpcln.Fill(dtcln);
    //    ddlstproductname.DataSource = dtcln;
    //    ddlstproductname.DataValueField = "VersionInfoId";
    //    ddlstproductname.DataTextField = "productversion";
    //    ddlstproductname.DataBind();
    //    ddlstproductname.Items.Insert(0, "All");
    //    ddlstproductname.Items[0].Value = "0";
    //}
    protected void fillstore()
    {
        DataTable ds1 = ClsStore.SelectStorename();

        if (ds1.Rows.Count > 0)
        {
            ddlstproductname.DataSource     = ds1;
            ddlstproductname.DataTextField  = "Name";
            ddlstproductname.DataValueField = "WarehouseId";
            ddlstproductname.DataBind();
            //ddlsearchByStore.Items.Insert(0, "All");
            //ddlsearchByStore.Items[0].Value = "0";
            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlstproductname.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
        }
    }
    protected void ware()
    {
        //string str1 = "select * from WarehouseMaster where comid='" + Session["comid"] + "' and WareHouseMaster.Status='1' order by Name";

        //DataTable ds1 = new DataTable();
        //SqlDataAdapter da = new SqlDataAdapter(str1, con);
        //da.Fill(ds1);
        DataTable ds = ClsStore.SelectStorename();

        if (ds.Rows.Count > 0)
        {
            ddlbus.DataSource     = ds;
            ddlbus.DataTextField  = "Name";
            ddlbus.DataValueField = "WarehouseId";
            ddlbus.DataBind();
        }
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlbus.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
Exemple #23
0
    protected void fillstore()
    {
        DataTable ds = ClsStore.SelectStorename();

        ddlbusiness.DataSource     = ds;
        ddlbusiness.DataTextField  = "Name";
        ddlbusiness.DataValueField = "WareHouseId";
        ddlbusiness.DataBind();


        if (Request.QueryString["Wid"] != null)
        {
            ddlbusiness.SelectedValue = Convert.ToString(Request.QueryString["Wid"]);
        }
        else
        {
            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlbusiness.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
        }
    }
    protected void Fillwarehouse()
    {
        DataTable ds = ClsStore.SelectStorename();

        if (ds.Rows.Count > 0)
        {
            ddlstore.DataSource     = ds;
            ddlstore.DataValueField = "WareHouseId";
            ddlstore.DataTextField  = "Name";
            ddlstore.DataBind();
            ddlfilterbus.DataSource     = ds;
            ddlfilterbus.DataValueField = "WareHouseId";
            ddlfilterbus.DataTextField  = "Name";
            ddlfilterbus.DataBind();
            ddlfilterbus.Items.Insert(0, "All");
            ddlfilterbus.Items[0].Value = "0";
            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlstore.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
        }
    }
    protected void fillfilterbusiness()
    {
        DropDownList1.Items.Clear();
        DataTable ds = ClsStore.SelectStorename();

        DropDownList1.DataSource     = ds;
        DropDownList1.DataTextField  = "Name";
        DropDownList1.DataValueField = "WareHouseId";
        DropDownList1.DataBind();
        DropDownList1.Items.Insert(0, "All");
        DropDownList1.Items[0].Value = "0";

        string         eeed    = " Select distinct EmployeeMaster.Whid from  EmployeeMaster where EmployeeMasterId='" + Session["EmployeeId"] + "'";
        SqlCommand     cmdeeed = new SqlCommand(eeed, con);
        SqlDataAdapter adpeeed = new SqlDataAdapter(cmdeeed);
        DataTable      dteeed  = new DataTable();

        adpeeed.Fill(dteeed);

        if (dteeed.Rows.Count > 0)
        {
            DropDownList1.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
Exemple #26
0
    protected void rdipright_SelectedIndexChanged(object sender, EventArgs e)
    {
        pnls.Visible = true;
        if (rdipright.SelectedIndex == 0)
        {
            pnlexample1.Visible   = true;
            pnlexample2.Visible   = false;
            lblCompany.Text       = Session["Cname"].ToString();
            lbluserp.Text         = "";
            lblheadc.Text         = "List of Allowed IP Addresses for Any Admin and Employee Users of the Company";
            Label4.Text           = "List of Allowed IP Addresses for Any Admin and Employee Users of the Company";
            lblselecttype.Text    = "The following IP Address will be added to the list of allowed IP addresses for all users of your company.";
            lblbusiness.Visible   = false;
            pnlusershow.Visible   = false;
            pnlfilteruser.Visible = false;
            FillGridView1();

            btnadtolist.Text = "Add to the Allowed IP Address List for All Users";
            btnaddn0.Text    = "Add to the Allowed IP Address List for All Users";

            // pnlusershow.Visible = false;

            Button2.Text = "Add to the Allowed IP Address List for All User";

            pnlvs.Visible         = false;
            lblselecttype.Visible = false;
            alluseripcheck();
        }
        else if (rdipright.SelectedIndex == 1)
        {
            specificuseripcheck();

            // pnlusershow.Visible = true;
            pnlvs.Visible         = false;
            Button2.Text          = "Add to the Allowed IP Address List for Specific User";
            btnadtolist.Text      = "Add to the Allowed IP Address List for Specific User";
            btnaddn0.Text         = "Add to the Allowed IP Address List for Specific User";
            lblselecttype.Visible = false;

            // pnldynmic.Visible = false;
            pnlexample1.Visible = false;
            pnlexample2.Visible = true;

            pnlfilteruser.Visible = true;
            lblselecttype.Text    = "The following IP Address will be added to the list of allowed IP addresses for specific users of your company.";

            // lblheadc.Text = "List of Allowed Ip Address for Access to a particular user";
            lblheadc.Text = "List of Allowed IP Addresses for Any Admin and Employee Users of the Company";

            Label4.Text = "List of Allowed IP Addresses for Any Admin and Employee Users of the Company";
            DataTable ds = ClsStore.SelectStorename();
            //  pnlusershow.Visible = true;
            if (ds.Rows.Count > 0)
            {
                ddlbusiness.DataSource     = ds;
                ddlbusiness.DataValueField = "WareHouseId";
                ddlbusiness.DataTextField  = "Name";

                ddlbusiness.DataBind();
                DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

                if (dteeed.Rows.Count > 0)
                {
                    ddlbusiness.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
                }
                ddlfilterbus.DataSource     = ds;
                ddlfilterbus.DataValueField = "WareHouseId";
                ddlfilterbus.DataTextField  = "Name";
                ddlfilterbus.DataBind();
                ddlfilterbus.Items.Insert(0, "All");
                ddlfilterbus.Items[0].Value = "0";
                ddlfilteruser.Items.Insert(0, "All");
                ddlfilteruser.Items[0].Value = "0";
            }
            ddlbusiness_SelectedIndexChanged(sender, e);
            ddlfilterbus_SelectedIndexChanged(sender, e);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            Label1.Text            = "";
            lblfilen.Text          = "";
            ViewState["sortOrder"] = "";
            Pagecontrol.dypcontrol(Page, page);

            DataTable ds = ClsStore.SelectStorename();
            ddlWarehouse.DataSource     = ds;
            ddlWarehouse.DataTextField  = "Name";
            ddlWarehouse.DataValueField = "WareHouseId";
            ddlWarehouse.DataBind();


            DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

            if (dteeed.Rows.Count > 0)
            {
                ddlWarehouse.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
            }
            //string strwh = "SELECT WareHouseId,Name,Address,CurrencyId FROM WareHouseMaster where comid='" + Session["comid"] + "'and Status='1' order by Name ";
            //SqlCommand cmdwh = new SqlCommand(strwh, con);
            //SqlDataAdapter adpwh = new SqlDataAdapter(cmdwh);
            //DataTable dtwh = new DataTable();
            //adpwh.Fill(dtwh);

            //ddlWarehouse.DataSource = dtwh;
            //ddlWarehouse.DataTextField = "Name";
            //ddlWarehouse.DataValueField = "WareHouseId";
            //ddlWarehouse.DataBind();
            if (ddlWarehouse.SelectedIndex > -1)
            {
                FillddlInvCat();
                ddlInvCat_SelectedIndexChanged(sender, e);
            }
            DropDownList2.DataSource     = (DataSet)fillMediaType();
            DropDownList2.DataTextField  = "MediaFileType";
            DropDownList2.DataValueField = "MediaFileTypeID";
            DropDownList2.DataBind();
            DropDownList2.Items.Insert(0, "-Select-");
            DropDownList2.Items[0].Value = "0";
        }
    }