protected override void EditRecord()
        {
            try
            {
                Data_BankAccount bankAccount = Utils.GetCurrentRecord <Data_BankAccount>(bsRecords);

                if (bankAccount != null)
                {
                    Data_BankAccount record = Data_BankAccount.GetBankAccount(bankAccount.BankAccountCode);

                    if (record != null)
                    {
                        BankAccountDialogFrm frm = new BankAccountDialogFrm(Common.FormMode.Edit, bankAccount);
                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            GetRecords();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Utils.ShowException(ex);
            }
        }
 private bool ValidateCode(String bankAccountCode)
 {
     try
     {
         Data_BankAccount record = Data_BankAccount.GetBankAccount(txtCode.Text.Trim());
         return(record == null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #3
0
        private void btnViewBankAccount_Click(object sender, EventArgs e)
        {
            try
            {
                Data_Payment payment = Utils.GetCurrentRecord <Data_Payment>(bsRecords);

                if (payment != null)
                {
                    Data_BankAccount bankAccount = Data_BankAccount.GetBankAccount(payment.BankAccountCode);

                    if (bankAccount != null)
                    {
                        BankAccountDialogFrm frm = new BankAccountDialogFrm(Common.FormMode.View, bankAccount);
                        frm.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                Utils.ShowException(ex);
            }
        }