Esempio n. 1
0
        private void bnNewUser_Click(object sender, EventArgs e)
        {
            FormNewUser  newUser   = new FormNewUser();
            DialogResult dlgResult = newUser.ShowDialog();

            if (dlgResult == DialogResult.OK)
            {
                string strName    = newUser.StrName;
                string strPW      = newUser.StrPassword;
                int    nUserRight = newUser.NRight;

                int nRet = userMge.CreateUser(strName,
                                              strPW, nUserRight, m_nSession);

                if (0 == nRet)
                {
                    MessageBox.Show("Success create user.");
                    RefreshUserList();
                }
                else
                {
                    MessageBox.Show("Failed to create user.");
                }
            }
        }
Esempio n. 2
0
        private void bnNewUser_Click(object sender, EventArgs e)
        {
            FormNewUser newUser = new FormNewUser();
            DialogResult dlgResult = newUser.ShowDialog();
            if (dlgResult ==  DialogResult.OK)
            {
                string strName = newUser.StrName;
                string strPW = newUser.StrPassword;
                int nUserRight = newUser.NRight;

                int nRet = userMge.CreateUser(strName,
                    strPW, nUserRight, m_nSession);

                if (0 == nRet)
                {
                    MessageBox.Show("Success create user.");
                    RefreshUserList();
                }
                else
                {
                    MessageBox.Show("Failed to create user.");
                }
            }
        }