public FrmEntryOperator(string header, Pengguna userOperator, IList <Role> listOfRole, IPenggunaBll bll) : base() { InitializeComponent(); ColorManagerHelper.SetTheme(this, this); base.SetHeader(header); base.SetButtonSelesaiToBatal(); this._bll = bll; this._operator = userOperator; this.listOfRole = listOfRole; LoadRole(); txtNama.Text = this._operator.nama_pengguna; try { if (this._operator.Role != null) { cmbRole.SelectedItem = this._operator.Role.nama_role; } } catch { if (listOfRole.Count > 0) { cmbRole.SelectedIndex = 0; } } if (this._operator.is_active) { rdoAktif.Checked = true; } else { rdoNonAktif.Checked = true; } }
public FrmListOperator(string header, Pengguna pengguna, string menuId) : base(header) { InitializeComponent(); _log = MainProgram.log; _bll = new PenggunaBll(_log); // set hak akses untuk SELECT var role = pengguna.GetRoleByMenuAndGrant(menuId, GrantState.SELECT); if (role != null) { if (role.is_grant) { LoadData(); } } InitGridList(); // set hak akses selain SELECT (TAMBAH, PERBAIKI dan HAPUS) RolePrivilegeHelper.SetHakAkses(this, pengguna, menuId, _listOfOperator.Count); }
public void CleanUp() { _bll = null; }
public void Init() { _log = LogManager.GetLogger(typeof(PenggunaBllTest)); _bll = new PenggunaBll(_log); }