private void buttonGetDetailsWithdraw_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBoxIbanWithdraw.Text == "")
                {
                    MessageBox.Show("Please enter IBAN on customer !",
                                    "Withdraw .", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
                else
                {
                    modelCustomerWithdraw = DataBaseOperations.getCustomer(textBoxIbanWithdraw.Text);

                    textBoxNameCustomerWithdraw.Text = modelCustomerWithdraw.NameCustomer;
                    textBoxEGNCustomerWithdraw.Text  = modelCustomerWithdraw.EgnCustomer;

                    ModelAccountCustomer = DataBaseOperations.getBalance(textBoxIbanWithdraw.Text);
                    textBoxAccountBalanceWithdraw.Text = ModelAccountCustomer.Balance.ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void buttonGetDetailsTransfer_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBoxFromIBanTransfer.Text == "")
                {
                    MessageBox.Show("Please enter IBAN on customer !",
                                    "Transfer .", MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
                else
                {
                    modelCustomerTransfer = DataBaseOperations.getCustomer(textBoxFromIBanTransfer.Text);

                    textBoxNameCusotmerTransfer.Text = modelCustomerTransfer.NameCustomer;
                    textBoxEGNCustomerTransfer.Text  = modelCustomerTransfer.EgnCustomer;

                    modelAccountCustomerTransfer       = DataBaseOperations.getBalance(textBoxFromIBanTransfer.Text);
                    textBoxAccountBalanceTransfer.Text = modelAccountCustomerTransfer.Balance.ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }