private void btnEditPaymentReceipt_Click(object sender, EventArgs e) { try { string _customerId = ""; try { _customerId = cboCustomer.SelectedValue.ToString(); } catch { MessageBoxUI _mb = new MessageBoxUI("You must select a Customer!", GlobalVariables.Icons.Error, GlobalVariables.Buttons.OK); _mb.showDialog(); return; } CashReceiptTransactionDetailUI loReceiptTransactionDetail = new CashReceiptTransactionDetailUI(_customerId, dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptId"].Value.ToString(), dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptSOId"].Value.ToString(), decimal.Parse(dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptAmountDue"].Value.ToString()), decimal.Parse(dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptPaymentAmount"].Value.ToString()), decimal.Parse(dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptBalance"].Value.ToString()), dgvDetailPaymentReceipt.CurrentRow.Cells["ReceiptRemarks"].Value.ToString()); loReceiptTransactionDetail.ParentList = this; loReceiptTransactionDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnEditPaymentReceipt_Click"); em.ShowDialog(); return; } }
private void btnAddPaymentReceipt_Click(object sender, EventArgs e) { try { string _customerId = ""; try { _customerId = cboCustomer.SelectedValue.ToString(); } catch { MessageBoxUI _mb = new MessageBoxUI("You must select a Customer!", GlobalVariables.Icons.Error, GlobalVariables.Buttons.OK); _mb.showDialog(); return; } CashReceiptTransactionDetailUI loReceiptTransactionDetail = new CashReceiptTransactionDetailUI(_customerId); loReceiptTransactionDetail.ParentList = this; loReceiptTransactionDetail.ShowDialog(); } catch (Exception ex) { ErrorMessageUI em = new ErrorMessageUI(ex.Message, this.Name, "btnAddPaymentReceipt_Click"); em.ShowDialog(); return; } }