コード例 #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
 protected override void AddRecord()
 {
     try
     {
         BankAccountDialogFrm frm = new BankAccountDialogFrm(Common.FormMode.Add, null);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             GetRecords();
         }
     }
     catch (Exception ex)
     {
         Utils.ShowException(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);
            }
        }