private void button7_Click_1(object sender, EventArgs e) { string login = registrovat_box.Text.ToString(); List <Customer> customers = Customer.ShowCustomersLogin(login); foreach (Customer c in customers) { registrovat_list.Items.Clear(); } foreach (Customer c in customers) { registrovat_list.Items.Add(c.login); } }
private void button6_Click_1(object sender, EventArgs e) { //pridat kredit hladat button string login = pridatKredit_login.Text; List <Customer> customers = Customer.ShowCustomersLogin(login); foreach (Customer c in customers) { listBox3.Items.Clear(); } foreach (Customer c in customers) { listBox3.Items.Add(c.login); listBox3.Items.Add(c.balance); listBox3.Items.Add("________________________________________"); } }
private void button8_Click(object sender, EventArgs e) { // pridat kredit uložiť button string login = pridatKredit_login.Text; string balance = pridatKredit_kredity.Text; List <Customer> customers = Customer.ShowCustomersLogin(login); foreach (Customer c in customers) { listBox3.Items.Clear(); } Customer.Update_balance(balance, login); List <Customer> customers2 = Customer.ShowCustomersLogin(login); foreach (Customer c in customers2) { listBox3.Items.Add(c.login); listBox3.Items.Add(c.balance); listBox3.Items.Add("________________________________________"); } }