Ejemplo n.º 1
0
        //For creating an User Account
        private void Button_CreateAccount(object sender, RoutedEventArgs e)
        {
            string userName  = usernameTxt.Text;
            string password  = passwordtxt.Password;
            string firstName = firstNametxt.Text;
            string lastName  = lastNameTxt.Text;

            if (!(String.IsNullOrEmpty(userName) || String.IsNullOrEmpty(password) ||
                  String.IsNullOrEmpty(firstName) || String.IsNullOrEmpty(lastName)))
            {
                op.InsertUser(userName, password, firstName, lastName);
                this.Hide();
                Owner.Show();
            }
            else
            {
                MessageBox.Show("Enter the values inside the field", "ERROR !!!!");
            }
        }