コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (iban.Text != "" && money.Text != "")
            {
                //Save in Text

                if (iban.Text.Length != 18)
                {
                    MessageBox.Show("Input IBAN not valid.");
                }
                else
                {
                    //Save
                    BankManage bank = new BankManage();
                    if (!bank.IsDupIBAN(iban.Text))
                    {
                        MessageBox.Show("Not found IBAN in system.");
                    }
                    else
                    {
                        //Save
                        bank.Deposite(iban.Text, decimal.Parse(money.Text));
                        this.Close();
                    }
                }
            }
            else
            {
                MessageBox.Show("Input Invalid.");
            }
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (iban.Text != "" && name.Text != "")
            {
                //Save in Text

                if (iban.Text.Length != 18)
                {
                    MessageBox.Show("Input IBAN not valid.");
                }
                else
                {
                    //Save
                    BankManage bank = new BankManage();
                    if (bank.IsDupIBAN(iban.Text))
                    {
                        MessageBox.Show("IBAN have exist in system.");
                    }
                    else
                    {
                        //Save
                        bank.CreateBank(iban.Text, name.Text);
                        this.Close();
                    }
                }
            }
            else
            {
                MessageBox.Show("Input Invalid.");
            }
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            //valid from exist
            BankManage bank = new BankManage();

            if (!bank.IsDupIBAN(from_iban.Text))
            {
                MessageBox.Show("Not found FROM IBAN in system.");
                this.Close();
            }

            //valid to exist
            if (!bank.IsDupIBAN(to_Iban.Text))
            {
                MessageBox.Show("Not found To IBAN in system.");
                this.Close();
            }

            //valid to exist
            if (String.IsNullOrEmpty(send_money.Text))
            {
                MessageBox.Show("Not found money.");
                this.Close();
            }

            //valid money
            string res = bank.Transfer(from_iban.Text, to_Iban.Text, send_money.Text);

            MessageBox.Show(res);
            this.Close();
        }
コード例 #4
0
        private void button4_Click(object sender, EventArgs e)
        {
            show_name.Text  = "";
            show_money.Text = "";


            BankManage bankM = new BankManage();

            AccountBank acc = bankM.GetDetailBank(iban_det.Text);



            show_name.Text  = acc.Name;
            show_money.Text = acc.Total;
        }