예제 #1
0
 public Bancomat(ClientBank _client)
 {
     InitializeComponent();
     client      = _client;
     account     = AllBankAccounts.GetAccount(client.numOfCurd);
     label1.Text = "Ваш текущий баланс: " + account.cashValue.ToString();
 }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            int         newCurd        = int.Parse(inputNumOfClientTextBox.Text);
            string      newFIO         = inputFIOOfClientTextBox.Text;
            string      newPass        = inputPassOfClientTextBox.Text;
            bool        newStatus      = true;
            int         newBill        = int.Parse(inputBillOfClientTextBox.Text);
            ClientBank  newClient      = new ClientBank(newCurd, newFIO, newPass, newStatus);
            BankAccount newBankAccount = new BankAccount(int.Parse(inputNumOfClientTextBox.Text), newBill);

            User.AddClient(newCurd, newClient);
            User.WriteToFileAllClients();
            AllBankAccounts.AddBankAccount(newCurd, newBankAccount);
            AllBankAccounts.WriteToFileAllClients();
            MessageBox.Show("Новый клиент добавлне в список");
            inputNumOfClientTextBox.Clear();
            inputFIOOfClientTextBox.Clear();
            inputPassOfClientTextBox.Clear();
            inputBillOfClientTextBox.Clear();
        }
예제 #3
0
 public MainForm()
 {
     InitializeComponent();
     User.ReadFromFileAllClients();
     AllBankAccounts.ReadFromFileAllClients();
 }