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[] { '/' }; lblCompany.Text = Session["Comid"].ToString(); string[] strSplitArr = strData.Split(separator); int i = Convert.ToInt32(strSplitArr.Length); string page = strSplitArr[i - 1].ToString(); Session["PageUrl"] = strData; Session["PageName"] = page; Page.Title = pg.getPageTitle(page); DataTable dsss = new DataTable(); dsss = clsMessage.Empid("158"); if (dsss.Rows.Count > 0) { Session["EmployeeIdep"] = dsss.Rows[0]["EmployeeMasterId"].ToString(); } if (!IsPostBack) { ViewState["sortOrder"] = ""; string str = "SELECT WareHouseId,Name,Address,CurrencyId FROM WareHouseMaster where comid = '" + Session["comid"] + "'and WareHouseMaster.Status='" + 1 + "' order by name"; SqlCommand cmd1 = new SqlCommand(str, con); cmd1.CommandType = CommandType.Text; SqlDataAdapter da = new SqlDataAdapter(cmd1); DataTable dt = new DataTable(); da.Fill(dt); ddlstore.DataSource = dt; ddlstore.DataTextField = "Name"; ddlstore.DataValueField = "WareHouseId"; ddlstore.DataBind(); ddlstore_SelectedIndexChanged(sender, e); //fillemail(); } }
protected void Page_Load(object sender, EventArgs e) { 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(); Session["PageUrl"] = strData; Session["PageName"] = page; Page.Title = pg.getPageTitle(page); DataTable dsss = new DataTable(); dsss = clsMessage.Empid("158"); if (dsss.Rows.Count > 0) { Session["EmployeeIdep"] = dsss.Rows[0]["EmployeeMasterId"].ToString(); } if (Session["CompanyName"] != null) { this.Title = Session["CompanyName"] + " IFileCabinet.com Draft Messages "; } Session["PageName"] = "MessageDrafts.aspx"; pnlmsg.Visible = false; if (!Page.IsPostBack) { filldatebyperiod(); fillusertype(); fillusertype111(); fillusername(); //ddlperiod.SelectedValue = "3"; SelectMsgforDraft(); } }
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(); Session["PageUrl"] = strData; Session["PageName"] = page; Page.Title = pg.getPageTitle(page); if (Session["CompanyName"] != null) { this.Title = Session["CompanyName"] + " IFileCabinet.com - Manage Email"; } if (!IsPostBack) { ViewState["sortOrder"] = ""; Pagecontrol.dypcontrol(Page, page); string str = "SELECT WareHouseId,Name,Address,CurrencyId FROM WareHouseMaster where comid = '" + Session["comid"] + "'and WareHouseMaster.Status='" + 1 + "' order by name"; SqlCommand cmd1 = new SqlCommand(str, con); cmd1.CommandType = CommandType.Text; SqlDataAdapter da = new SqlDataAdapter(cmd1); DataTable dt = new DataTable(); da.Fill(dt); ddlstore.DataSource = dt; ddlstore.DataTextField = "Name"; ddlstore.DataValueField = "WareHouseId"; ddlstore.DataBind(); ddlbusinessfil.DataSource = dt; ddlbusinessfil.DataTextField = "Name"; ddlbusinessfil.DataValueField = "WareHouseId"; ddlbusinessfil.DataBind(); ddlbusinessfil.Items.Insert(0, "All"); ddlbusinessfil.Items[0].Value = "0"; DataTable dsss = new DataTable(); dsss = clsMessage.Empid(ddlstore.SelectedValue); if (dsss.Rows.Count > 0) { Session["EmployeeIdep"] = dsss.Rows[0]["EmployeeMasterId"].ToString(); } else { Session["EmployeeIdep"] = "0"; } ddlempfil.Items.Insert(0, "All"); ddlempfil.Items[0].Value = "0"; ddlemp.Items.Insert(0, "Select"); ddlemp.Items[0].Value = "0"; ViewState["Dltitem"] = ""; lblCompany.Text = Session["comid"].ToString(); lblBusiness.Text = "All"; FillGrid(); imgupdate.Visible = false; imgbtnsubmitCabinetAdd.Visible = true; //imgcancel.Visible = false; } }