protected void InventoryGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { //string search= (string)ViewState["search"]; InventoryGridView.DataSource = CatalogueBizLogic.ListCatalogue(searchString); InventoryGridView.PageIndex = e.NewPageIndex; InventoryGridView.DataBind(); }
protected void ManageCatalogueGridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue(searchString); ManageCatalogueGridView.PageIndex = e.NewPageIndex; ManageCatalogueGridView.DataBind(); BindGrid1(); }
public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e) { var listOfLowStockItems = CatalogueBizLogic.ListLowStockItems(); ScheduleEmail objScheduleMail = new ScheduleEmail(); objScheduleMail.SendScheduleMail(listOfLowStockItems); }
protected void ManageCatalogueGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = ManageCatalogueGridView.Rows[e.RowIndex]; string itemNumber = ManageCatalogueGridView.DataKeys[e.RowIndex].Values[0].ToString(); int reorderLevel = Convert.ToInt32((row.FindControl("TextBox1") as TextBox).Text); int reorderQty = Convert.ToInt32((row.FindControl("TextBox2") as TextBox).Text); CatalogueBizLogic.UpdateItem(itemNumber, reorderLevel, reorderQty); ManageCatalogueGridView.EditIndex = -1; BindGrid(); }
// Check if itemCode entered is valid or not protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { string itemId = args.Value; if (CatalogueBizLogic.CheckIfItemExists(itemId)) { args.IsValid = true; } else { args.IsValid = false; } }
protected void SearchButton_Click(object sender, EventArgs e) { searchString = SearchTextBox.Text; ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue(SearchTextBox.Text); ManageCatalogueGridView.DataBind(); }
private void BindGrid1() { ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue(); ManageCatalogueGridView.DataBind(); }