protected void SearchButton_Click(object sender, EventArgs e) { searchString = SearchTextBox.Text; ItemListGridView.DataSource = RequestBizLogic.SearchCatalogue(searchString); ItemListGridView.DataBind(); BindGrid(); }
protected void Page_Load(object sender, EventArgs e) { if (HttpContext.Current.Session["EmpID"] == null) { Response.Redirect("/Account/Login.aspx"); } else { int EmpID = (int)HttpContext.Current.Session["EmpID"]; ViewState["qty"] = Convert.ToInt32(TextBoxQty.Text); if (!IsPostBack) { HideButton(); } if (searchBy != "") { ; } else { ItemListGridView.DataSource = RequestBizLogic.ViewAll(); ItemListGridView.DataBind(); } ViewGV(); HideGVCart(); } }
protected void ButtonSearch_Click(object sender, EventArgs e) { searchBy = TextBoxSearch.Text.ToString(); ItemListGridView.DataSource = RequestBizLogic.SearchCatalogue(searchBy); ItemListGridView.DataBind(); ViewGV(); HideButton(); HideGVCart(); ButtonDecreaseQty.Visible = false; ButtonIncreaseQty.Visible = false; }
protected void ButtonAddtoCart_Click(object sender, EventArgs e) { int qty = Convert.ToInt32(TextBoxQty.Text); string itemId = (string)ViewState["itemid"]; int EmpID = (int)HttpContext.Current.Session["EmpID"]; RequestBizLogic.AddRequestDetail(itemId, EmpID, qty); ItemListGridView.DataSource = RequestBizLogic.ViewAll(); ItemListGridView.DataBind(); ViewGV(); HideButton(); ButtonDecreaseQty.Visible = false; ButtonIncreaseQty.Visible = false; }
protected void ItemListGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { ItemListGridView.PageIndex = e.NewPageIndex; ItemListGridView.DataBind(); BindGrid(); }
private void BindGrid() { ItemListGridView.DataSource = RequestBizLogic.SearchCatalogue(searchString); ItemListGridView.DataBind(); }
protected void ItemListGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { ItemListGridView.DataSource = RequestBizLogic.SearchCatalogue(searchBy); ItemListGridView.PageIndex = e.NewPageIndex; ItemListGridView.DataBind(); }