Beispiel #1
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            //Show Label with Item Description
            string itemQuery   = txtItemCode.Text.ToUpper();
            string description = PurvaBizLogic.GetDescriptionFromItemCode(itemQuery);

            //lblDescription.Text = description;
            //Have check if duplicate item
            if (!checkDuplicates(itemQuery))
            {
                if (!String.IsNullOrEmpty(description))
                {
                    lblTag.Text        = "Description: " + description;
                    lblTag.Visible     = true;
                    btnAddItem.Visible = true;
                }
                else
                {
                    lblTag.Text    = "No such item";
                    lblTag.Visible = true;
                }
            }
            else
            {
                lblTag.Text    = "Item already in list ";
                lblTag.Visible = true;
            }
        }
Beispiel #2
0
 protected void btnAddItem_Click(object sender, EventArgs e)
 {
     listSource.Add(PurvaBizLogic.GetItemByCode(txtItemCode.Text));
     Session["Shortfall"] = listSource;
     lblTag.Visible       = false;
     txtItemCode.Text     = "";
     dataRefresh();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         dgvSupList.DataSource = PurvaBizLogic.ShowSuppliers();
         dgvSupList.DataBind();
         dgvSupList.AllowPaging = true;
     }
 }
        protected void dgvSupList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                ////Pass in Item Code to Pop up window
                //// Convert the row index stored in the CommandArgument property to an Integer.
                //int index = Convert.ToInt32(e.CommandArgument.ToString());
                ////Reference the GridView Row.
                //GridViewRow row = dgvSupList.Rows[index];
                //string supplierName = row.Cells[0].Text.ToString();

                GridViewRow gvRow = (GridViewRow)(((Button)e.CommandSource).NamingContainer);
                //Get JobId value and save to session or other page object
                string   supplierCode = gvRow.Cells[0].Text;
                Supplier supplier     = PurvaBizLogic.GetSupplier(supplierCode);
                Session["Supplier"] = supplier;
                Response.Redirect("SupplierDetailPage.aspx");
            }
        }
Beispiel #5
0
        protected void btnGeneratePO_Click(object sender, EventArgs e)
        {
            Page.Validate("Supplier1");
            Page.Validate("Supplier2");
            Page.Validate("Supplier3");
            //Check all non-zero qty is above Min Order qty - Check done in iterateItems()
            List <POIntermediate> poList = iterateItems();

            //Generate PO DTO
            if (Page.IsValid)
            {
                //Generate requisitions
                //TEST
                //string test = PurvaBizLogic.SavePOInfo(poList);
                //lblTest.Text = test;
                int storeStaffID = (int)Session["clerkid"];
                if (PurvaBizLogic.SavePOInfo(poList, storeStaffID))
                {
                    Response.Redirect("PurchaseOrderPage.aspx");
                }
            }
        }
Beispiel #6
0
 protected void btnCreatePO_Click(object sender, EventArgs e)
 {
     Session["Shortfall"] = PurvaBizLogic.GetLowStockByStatus("True");
     Response.Redirect("GeneratePO.aspx");
 }
 protected void dgvSupList_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     dgvSupList.PageIndex  = e.NewPageIndex;
     dgvSupList.DataSource = PurvaBizLogic.ShowSuppliers();
     dgvSupList.DataBind();
 }