Exemplo n.º 1
0
 protected void PendingPurchaseOrderGridView_Delete(object sender, GridViewDeleteEventArgs e)
 {
     try
     {
         int pONo = Int32.Parse(PendingPurchaseOrderGridView.Rows[e.RowIndex].Cells[0].Text);
         POController.DeletePO(pONo);
         BindGrid();
         Session["POProcessed"] = pONo;
     }
     catch (Exception exception)
     {
         Session["Error"] = "An Error Has Occured: " + exception.Message;
     }
 }
Exemplo n.º 2
0
    protected void Button_Click(object sender, EventArgs e)
    {
        try
        {
            Button buttonPressed = (Button)sender;

            // Delete Button
            if (buttonPressed.CommandArgument == "Delete")
            {
                // Delete Purchase Order
                POController.DeletePO(pONo);
                Session["POProcessed"] = (int)Session["PONo"];
            }
        }
        catch (Exception exception)
        {
            Session["Error"] = "An Error Has Occured: " + exception.Message;
        }
        if (Session["Error"] == null)
        {
            GoToPurchaseOrderListPage();
        }
    }