form8.cs

来自「模拟银行系统的实现」· CS 代码 · 共 75 行

CS
75
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Project1
{
    public partial class formDeposit : Form
    {
        //Account account = new Account();
        public formDeposit()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                //BankOperationsFactory.getBankOperationsInstance().deposit(Int32.Parse(txtAccNo.Text), Double.Parse(txtAmount.Text));
                //bankOpera.deposit();
                Account Acc = AccountDatabaseFactory.getDatabaseInstance().search(Int32.Parse(txtAccNo.Text));

                if (Acc != null)
                {   
                    txtAccNo.Text = Acc.iAcNo.ToString();
                    txtCustID.Text = Acc.sCustID;
                    txtCustName.Text = "jjk";
                    txtAccType.Text = Acc.sAcType;
                    txtDate.Text = DateTime.Today.ToShortDateString();
                    txtAmount.Text = Acc.dBalance.ToString();

                }
                else
                {
                    MessageBox.Show("can not find the record");
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }

                    


             
            
        }

        private void formDeposit_Load(object sender, EventArgs e)
        {
        
        }

        private void button2_Click(object sender, EventArgs e)
        {
        
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Dispose();
            formInfyBank f2 = new formInfyBank();
            f2.Show();
        }
       

        
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?