예제 #1
0
        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);
            }
        }
예제 #2
0
 private bool ValidateCode(String bankAccountCode)
 {
     try
     {
         Data_BankAccount record = Data_BankAccount.GetBankAccount(txtCode.Text.Trim());
         return(record == null);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #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);
            }
        }