Example #1
0
 private void SetBankSortCode(vwBankBranch _vwBankBranch)
 {
     try
     {
         lblBankDetails.Text = string.Empty;
         if (_vwBankBranch != null)
         {
             txtBankSortCode.Text = _vwBankBranch.BankSortCode.Trim();
             lblBankDetails.Text  = _vwBankBranch.BankBranchName.Trim();
         }
     }
     catch (Exception ex)
     {
         Utils.ShowError(ex);
     }
 }
Example #2
0
        private void dataGridViewBanks_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridViewBanks.SelectedRows.Count > 0)
            {
                try
                {
                    vwBankBranch selectedBankBranch = (vwBankBranch)bindingSourceBanks.Current;
                    OnBankListSelected(this, new BankSelectEventArgs(selectedBankBranch));

                    this.Close();
                }
                catch (Exception ex)
                {
                    Utils.ShowError(ex);
                }
            }
        }
Example #3
0
        private void btnSubmit_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (dataGridViewBanks.SelectedRows.Count > 0)
            {
                try
                {
                    vwBankBranch selectedBankBranch = (vwBankBranch)bindingSourceBanks.Current;
                    OnBankListSelected(this, new BankSelectEventArgs(selectedBankBranch));

                    this.Close();
                }
                catch (Exception ex)
                {
                    Utils.ShowError(ex);
                }
            }
        }
 // class constructor
 public BankSelectEventArgs(vwBankBranch banksortcode)
 {
     this._banksortcode = banksortcode;
 }