Esempio n. 1
0
        private void FormConfirming(Users user, string pwd)
        {
            if (string.IsNullOrWhiteSpace(pwd))
            {
                MessageBox.Show("The password is mandatory");
            }
            else
            {
                user = BL_Users.ChangePassword(user, pwd);

                BL_Users.Create(user);

                if (OnUserCreated != null)
                {
                    OnUserCreated(user.Username, pwd);
                }

                this.Close();
            }
        }
Esempio n. 2
0
        private void NewUserForm_Confirming(Users user, string pwd)
        {
            try
            {
                if (string.IsNullOrEmpty(pwd))
                {
                    pwd = StringExtensions.GetRandomString();
                }

                user = BL_Users.ChangePassword(user, pwd);
                BL_Users.Create(user);



                btnUserOverview_Click(btnUserOverview, null);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }