private void btnCreateRole_Click(object sender, EventArgs e) { BOUser current_user = AccountantPool.Instance.CurrentAccountant.User; AuthRole role = current_user.CreateAuthRole(); FrmAuthRole frm = new FrmAuthRole(role); if (frm.ShowDialog() == DialogResult.OK) { ViewModel(); } }
private void dgvRoles_DoubleClick(object sender, EventArgs e) { int RoleID; if (WinFormUtil.DataGridView_GetSelectedID(dgvRoles, out RoleID)) { BOUser current_user = AccountantPool.Instance.CurrentAccountant.User; AuthRole role = current_user.GetAuthRole(RoleID); if (role != null) { FrmAuthRole frm = new FrmAuthRole(role); if (frm.ShowDialog() == DialogResult.OK) { ViewModel(); } } } }