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) { ddlstrname.DataSource = ds; ddlstrname.DataValueField = "WareHouseId"; ddlstrname.DataTextField = "Name"; ddlstrname.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) { ddlstrname.SelectedValue = Convert.ToString(dteeed.Rows[0]["Whid"]); } } }
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"; } }
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 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); } }