Пример #1
0
 protected void InventoryGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     //string search= (string)ViewState["search"];
     InventoryGridView.DataSource = CatalogueBizLogic.ListCatalogue(searchString);
     InventoryGridView.PageIndex  = e.NewPageIndex;
     InventoryGridView.DataBind();
 }
Пример #2
0
 protected void ManageCatalogueGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue(searchString);
     ManageCatalogueGridView.PageIndex  = e.NewPageIndex;
     ManageCatalogueGridView.DataBind();
     BindGrid1();
 }
Пример #3
0
        public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e)
        {
            var listOfLowStockItems = CatalogueBizLogic.ListLowStockItems();

            ScheduleEmail objScheduleMail = new ScheduleEmail();

            objScheduleMail.SendScheduleMail(listOfLowStockItems);
        }
Пример #4
0
        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;
            }
        }
Пример #6
0
 protected void SearchButton_Click(object sender, EventArgs e)
 {
     searchString = SearchTextBox.Text;
     ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue(SearchTextBox.Text);
     ManageCatalogueGridView.DataBind();
 }
Пример #7
0
 private void BindGrid1()
 {
     ManageCatalogueGridView.DataSource = CatalogueBizLogic.ListCatalogue();
     ManageCatalogueGridView.DataBind();
 }