Example #1
0
        private void button9_Click(object sender, EventArgs e)
        {
            //save registrovanie zakaznika
            Customer customer = new Customer();

            customer.login     = registrovat_uzivatela.Text;
            customer.password  = registrovat_heslo.Text;
            customer.firstName = registrovat_meno.Text;
            customer.lastName  = registrovat_priezvisko.Text;
            customer.address   = registrovat_adresa.Text;
            customer.balance   = registrovat_kredity.Text;

            Customer.SignUp(customer);
            List <Customer> customers = Customer.ShowCustomers();

            foreach (Customer c in customers)
            {
                registrovat_list.Items.Add(c.login);
            }

            registrovat_uzivatela.Text  = "";
            registrovat_heslo.Text      = "";
            registrovat_meno.Text       = "";
            registrovat_priezvisko.Text = "";
            registrovat_adresa.Text     = "";
            registrovat_kredity.Text    = "";
        }