Beispiel #1
0
        /// <summary>
        /// "注册"按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void registerButton_Click(object sender, EventArgs e)
        {
            RegisterForm registerForm = new RegisterForm();
            DialogResult result       = registerForm.ShowDialog();

            if (result == DialogResult.Yes)
            {
                userCombobox.Items.Clear(); //先将Combobox清空
                LoginForm_Load(sender, e);  //重新加载一次,就像是重新加载了数据库
            }
        }
Beispiel #2
0
        /// <summary>
        /// ”添加用户“,加了权限,只有管理员才能再MainForm里面添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void addToolStripButton_Click(object sender, EventArgs e)
        {
            RegisterForm addUserForm = new RegisterForm();

            addUserForm.Show();
        }