示例#1
0
        void Btn_NewUserClick(object sender, EventArgs e)
        {
            if (Functions.hasPermission("Users Management", "New User") == false)
            {
                MessageBox.Show("You don't have rights to perform this action.");
                return;
            }
            FrmUser F = new FrmUser();

            F.ShowDialog();

            RefreshList();
        }
示例#2
0
        void Btn_edit_selectedUserClick(object sender, EventArgs e)
        {
            if (Functions.hasPermission("Users Management", "Edit User") == false)
            {
                MessageBox.Show("You don't have rights to perform this action.");
                return;
            }

            if (dgv_users.SelectedRows.Count == 0)
            {
                MessageBox.Show("Please select user to edit!");
                return;
            }

            FrmUser F = new FrmUser();

            F.user_id = dgv_users.SelectedRows[0].Cells["System ID"].Value.ToString();

            F.ShowDialog();

            RefreshList();
        }