Example #1
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()
    {
        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";
    }
Example #3
0
    protected void Fillwarehouse()
    {
        ddlstrname.Items.Clear();
        string         str = "select WareHouseId,Name from WareHouseMaster WHERE comid='" + Session["Comid"].ToString() + "' and [WareHouseMaster].Status='1' order by Name ";
        SqlCommand     cmd = new SqlCommand(str, con);
        SqlDataAdapter adp = new SqlDataAdapter(cmd);
        DataSet        ds  = new DataSet();

        adp.Fill(ds);
        ddlstrname.DataSource     = ds;
        ddlstrname.DataTextField  = "Name";
        ddlstrname.DataValueField = "WareHouseId";
        ddlstrname.DataBind();
        ViewState["cd"] = "1";
        ddlstrname.Items.Insert(0, "-Select-");
        ddlstrname.Items[0].Value = "0";

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

        if (dteeed.Rows.Count > 0)
        {
            ddlstrname.SelectedValue     = Convert.ToString(dteeed.Rows[0]["Whid"]);
            ddlfilterstore.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
    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 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");
    }
Example #6
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"]);
        //}
    }
    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 FillddlStoreLocationDE()
    {
        string         stSL  = "SELECT  WareHouseId,Name ,Address ,CurrencyId FROM  WareHouseMaster where comid='" + Session["comid"] + "' order by Name";
        SqlCommand     cmdSL = new SqlCommand(stSL, con);
        SqlDataAdapter adpSL = new SqlDataAdapter(cmdSL);
        DataTable      dtSL  = new DataTable();

        adpSL.Fill(dtSL);

        ddlStoreLocationDe.DataSource     = dtSL;
        ddlStoreLocationDe.DataTextField  = "Name";
        ddlStoreLocationDe.DataValueField = "WareHouseId";

        ddlStoreLocationDe.DataBind();

        ddlStoreLocationDe.Items.Insert(0, "Select");
        ddlStoreLocationDe.Items[0].Value = "0";

        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        if (dteeed.Rows.Count > 0)
        {
            ddlStoreLocationDe.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]);
        }
    }
    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 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 fillemployee()
    {
        DataTable dsemp = ClsStore.SelectEmployeewithBusinessId(DropDownList1.SelectedValue);

        DropDownList2.DataSource     = dsemp;
        DropDownList2.DataTextField  = "EmployeeName";
        DropDownList2.DataValueField = "EmployeeMasterID";
        DropDownList2.DataBind();
    }
Example #12
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";
    }
Example #17
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";
        }
    }
Example #18
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";
    }
Example #19
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"]);
        }
    }
    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";
    }
Example #22
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"]);
        }
    }
    public void DDLsuppliername()
    {
        DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

        string finalstr = "Select * from SupplierMasterTbl where CompanyName!='' Order By CompanyName";

        finalstr = " SELECT DISTINCT dbo.Party_master.Compname ,dbo.Party_master.Compname + ':'+ dbo.Party_master.Contactperson as CompanyName, dbo.PartyTypeCategoryMasterTbl.PartyCategoryName, dbo.PartytTypeMaster.PartType, dbo.Party_master.PartyID FROM dbo.Party_master INNER JOIN dbo.PartytTypeMaster ON dbo.Party_master.PartyTypeId = dbo.PartytTypeMaster.PartyTypeId INNER JOIN dbo.PartyTypeCategoryMasterTbl ON dbo.PartytTypeMaster.PartyCategoryId = dbo.PartyTypeCategoryMasterTbl.PartyTypeCategoryMasterId WHERE  dbo.Party_master.Whid='" + dteeed.Rows[0]["Whid"] + "' and (dbo.PartytTypeMaster.PartType = 'Vendor')  and dbo.PartyTypeCategoryMasterTbl.Active='1'  Order By dbo.Party_master.Compname ";

        SqlCommand     cmdcln = new SqlCommand(finalstr, iofficecon);
        SqlDataAdapter adpcln = new SqlDataAdapter(cmdcln);
        DataTable      dtcln  = new DataTable();

        adpcln.Fill(dtcln);
        ddlsupplier.DataSource     = dtcln;
        ddlsupplier.DataValueField = "PartyID";
        ddlsupplier.DataTextField  = "CompanyName";
        ddlsupplier.DataBind();
        ddlsupplier.Items.Insert(0, "--Select--");
        ddlsupplier.Items[0].Value = "0";
    }
Example #24
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"]);
        }
    }
Example #26
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 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"]);
        }
    }
Example #28
0
    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"]);
            }
        }
    }
Example #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //PageConn pgcon = new PageConn();
        //con = pgcon.dynconn;
        //connection = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        compid = Session["Comid"].ToString();
        char[] separator = new char[] { '/' };

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

        page = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!IsPostBack)
        {
            if (Request.QueryString["docid"] != null)
            {
                DataTable dtpt11 = MainAcocount.SelectDocumentMasterwithId(Convert.ToString(Request.QueryString["docid"]));


                if (dtpt11.Rows.Count > 0)
                {
                    Label2.Text  = dtpt11.Rows[0]["DocumentId"].ToString();
                    Label10.Text = dtpt11.Rows[0]["DocumentTitle"].ToString();

                    Label11.Text = Convert.ToDateTime(dtpt11.Rows[0]["DocumentDate"]).ToShortDateString();;

                    Label12.Text = dtpt11.Rows[0]["DocumentType"].ToString();
                    Fillddlwarehouse();
                    ddlwarehouse.SelectedValue = dtpt11.Rows[0]["WarehouseId"].ToString();
                    ddlwarehouse.Enabled       = false;
                    ddlwarehouse_SelectedIndexChanged(sender, e);
                    pnnl.Visible = true;
                }
            }
        }
        if (!IsPostBack)
        {
            if (Request.QueryString["docid"] == null)
            {
                fillware();

                DataTable dteeed = ClsStore.SelectEmployeewithIdwise();

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


            lblMSG.Visible    = false;
            txtDate.Text      = System.DateTime.Now.ToShortDateString();
            lblentrytype.Text = "Journal Entry";
            if (Request.QueryString["Tid"] != null)
            { // if (Request.QueryString["EntryN"] != null && Request.QueryString["EntryT"] != null)
                ddlwarehouse.Enabled = false;
                ViewState["Trid"]    = Request.QueryString["Tid"].ToString();
                ViewState["tid"]     = ViewState["Trid"];
                FillRequestedData();
            }
            else
            {
                fillwareselect();
            }
        }
    }
    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";
        }
    }