//Populating gridview with MOPs private void PopulateGridviewMOP(double amountPaid, int methodOfPayment, object[] amounts) { //Collects current method for error tracking string method = "populateGridviewMOP"; object[] objPageDetails = { Session["currPage"].ToString(), method }; try { InvoiceMOPsManager IMM = new InvoiceMOPsManager(); InvoiceMOPs invoicePayment = new InvoiceMOPs { intInvoiceID = Convert.ToInt32(Request.QueryString["invoice"].ToString()), intPaymentID = methodOfPayment, fltAmountPaid = amountPaid, fltTenderedAmount = Convert.ToDouble(amounts[0]), fltCustomerChange = Convert.ToDouble(amounts[1]) }; IMM.CallAddNewMopToList(invoicePayment, objPageDetails); UpdatePageTotals(); } //Exception catch catch (ThreadAbortException tae) { } catch (Exception ex) { //Log all info into error table ER.CallLogError(ex, CU.employee.intEmployeeID, Convert.ToString(Session["currPage"]) + "-V3.2", method, this); //Display message box MessageBoxCustom.ShowMessage("An Error has occurred and been logged. " + "If you continue to receive this message please contact " + "your system administrator.", this); } }
private void AddNewMopToReceiptList(InvoiceMOPs payment, object[] objPageDetails) { string strQueryName = "AddNewMopToReceiptList"; string sqlCmd = "INSERT INTO tbl_currentPurchaseMops VALUES(@intReceiptID, @intPaymentID, @intChequeNumber, @fltAmountPaid)"; object[][] parms = { new object[] { "@intReceiptID", payment.intInvoiceID }, new object[] { "@intPaymentID", payment.intPaymentID }, new object[] { "@intChequeNumber", payment.intChequeNumber }, new object[] { "@fltAmountPaid", payment.fltAmountPaid } }; DBC.MakeDataBaseCallToNonReturnDataQuery(sqlCmd, parms, objPageDetails, strQueryName); //dbc.executeInsertQuery(sqlCmd, parms, objPageDetails, strQueryName); }
private void AddNewMopToList(InvoiceMOPs invoicePayment, object[] objPageDetails) { string strQueryName = "AddNewMopToList"; string sqlCmd = "INSERT INTO tbl_currentSalesMops VALUES(@intInvoiceID, @intPaymentID, @fltAmountPaid, @fltTenderedAmount, " + "@fltCustomerChange)"; object[][] parms = { new object[] { "@intInvoiceID", invoicePayment.intInvoiceID }, new object[] { "@intPaymentID", invoicePayment.intPaymentID }, new object[] { "@fltAmountPaid", invoicePayment.fltAmountPaid }, new object[] { "@fltTenderedAmount", invoicePayment.fltTenderedAmount }, new object[] { "@fltCustomerChange", invoicePayment.fltCustomerChange } }; DBC.MakeDataBaseCallToNonReturnDataQuery(sqlCmd, parms, objPageDetails, strQueryName); //dbc.executeInsertQuery(sqlCmd, parms, objPageDetails, strQueryName); }
//Populating gridview with MOPs protected void PopulateGridviewMOP(double amountPaid, int paymentID, int chequeNumber) { //Collects current method for error tracking string method = "PopulateGridviewMOP"; object[] objPageDetails = { Session["currPage"].ToString(), method }; try { if (amountPaid > 0) { amountPaid *= -1; } InvoiceMOPsManager IMM = new InvoiceMOPsManager(); InvoiceMOPs payment = new InvoiceMOPs { intInvoiceID = Convert.ToInt32(Request.QueryString["receipt"]), fltAmountPaid = amountPaid, intPaymentID = paymentID, intChequeNumber = chequeNumber }; IMM.CallAddNewMopToReceiptList(payment, objPageDetails); //Center the mop grid view UpdatePageTotals(); } //Exception catch catch (ThreadAbortException) { } catch (Exception ex) { //Log all info into error table ER.CallLogError(ex, CU.employee.intEmployeeID, Convert.ToString(Session["currPage"]), method, this); //Display message box MessageBoxCustom.ShowMessage("An Error has occurred and been logged. " + "If you continue to receive this message please contact " + "your system administrator.", this); } }
public void CallAddNewMopToReceiptList(InvoiceMOPs payment, object[] objPageDetails) { AddNewMopToReceiptList(payment, objPageDetails); }
public void CallAddNewMopToList(InvoiceMOPs invoicePayment, object[] objPageDetails) { AddNewMopToList(invoicePayment, objPageDetails); }