public Bancomat(ClientBank _client) { InitializeComponent(); client = _client; account = AllBankAccounts.GetAccount(client.numOfCurd); label1.Text = "Ваш текущий баланс: " + account.cashValue.ToString(); }
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(); }
public MainForm() { InitializeComponent(); User.ReadFromFileAllClients(); AllBankAccounts.ReadFromFileAllClients(); }