Exemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (reg_model.Password != reg_model.Reapetedpassword)
            {
                MessageBox.Show("Password is diffrent", "Error", MessageBoxButton.OK);
                return;
            }
            if (reg_model.Termaccepted != true)
            {
                MessageBox.Show("U must check Termaccept", "Error", MessageBoxButton.OK);
                return;
            }
            var user = new Useraccount()
            {
                username        = reg_model.Login,
                password        = reg_model.Password,
                Termaccepted    = DateTime.Today,
                Accountcreation = DateTime.Today
            };

            db_con.Add_user(user);
            reg_model.Login            = null;
            reg_model.Password         = "";
            reg_model.Reapetedpassword = "";
        }
Exemplo n.º 2
0
 public void Add_user(Useraccount user)
 {
     MessageBox.Show("Uzytkownik " + user.username + " został dodany do bazy !", "Info", MessageBoxButton.OK);
 }