Пример #1
0
        private void LoadBankAccount(int BankACId)
        {
            BankManager manageBank    = new BankManager();
            DataTable   dtBankAccount = manageBank.GetBankAccount(BankACId);

            if (dtBankAccount.Rows.Count > 0)
            {
                txtBACTitle.Text = dtBankAccount.Rows[0]["AccountTitle"].ToString();
                if (!string.IsNullOrEmpty(dtBankAccount.Rows[0]["COAId"].ToString()))
                {
                    txtBankAcc.Text = manageAccount.GetChartOfAccounts(Convert.ToInt32(dtBankAccount.Rows[0]["COAId"])).Rows[0]["AccountCode"].ToString();
                }
                BankId = Convert.ToInt32(dtBankAccount.Rows[0]["BankId"]);
            }
        }
Пример #2
0
 private void txtBankAccountCode_TextChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtBankAccountCode.Text))
     {
         BankManager manageBank = new BankManager();
         BankACId = manageBank.GetBankACIdByCode(txtBankAccountCode.Text);
         if (BankACId > 0)
         {
             LoadBankAccount(BankACId);
         }
     }
     else
     {
         txtBACTitle.Text = string.Empty;
     }
 }