// Метод додавання клієнта в LinkedList private void AddClient() { AddClient myform2 = new AddClient(); myform2.ShowDialog(); if (myform2.Account == "current") { Deposit.AddFirst(new Deposit_account { PIN = myform2.PIN_CODE, FullName = myform2.FullName, Date = myform2.Date, Interestrate = myform2.InterestRate, Score = myform2.Score, }); } else if (myform2.Account == "deposit") { Current.AddFirst(new Current_account { PIN = myform2.PIN_CODE, FullName = myform2.FullName, Date = myform2.Date, Interestrate = myform2.InterestRate, Score = myform2.Score, }); } }
// Відкриває вікно AddClient private void button1_Click(object sender, EventArgs e) { AddClient myForm2 = new AddClient(); AddClient(); }