/// <summary>
 /// Initializes a new instance of the <see cref="LoginBll" /> class.
 /// </summary>
 /// <param name="config">The config value.</param>
 public LoginBll(IConfigSetting config, IUnitOfWork unitOfWork, IAdService adService, IRoleBll roleBll)
 {
     _config     = config;
     _unitOfWork = unitOfWork;
     _adService  = adService;
     _roleBll    = roleBll;
 }
예제 #2
0
        public FrmListHakAkses(string header, Pengguna pengguna, string menuId)
            : base()
        {
            InitializeComponent();

            base.SetHeader(header);
            base.WindowState = FormWindowState.Maximized;

            _log = MainProgram.log;
            _bll = new RoleBll(_log);

            // set hak akses untuk SELECT
            var role = pengguna.GetRoleByMenuAndGrant(menuId, GrantState.SELECT);

            if (role != null)
            {
                if (role.is_grant)
                {
                    LoadMenuParent();
                    SetMenuParent(cmbMenu);

                    LoadData();
                }

                cmbMenu.Enabled       = role.is_grant;
                chkPilihSemua.Enabled = role.is_grant;
                btnSimpan.Enabled     = role.is_grant;
            }

            InitGridList();

            // set hak akses selain SELECT (TAMBAH, PERBAIKI dan HAPUS)
            RolePrivilegeHelper.SetHakAkses(this, pengguna, menuId, _listOfRole.Count);
        }
예제 #3
0
        public FrmEntryHakAkses(string header, IRoleBll bll)
            : base()
        {
            InitializeComponent();
            ColorManagerHelper.SetTheme(this, this);

            base.SetHeader(header);
            this._bll = bll;

            this._isNewData = true;
        }
예제 #4
0
        public FrmEntryHakAkses(string header, Role role, IRoleBll bll)
            : base()
        {
            InitializeComponent();
            ColorManagerHelper.SetTheme(this, this);

            base.SetHeader(header);
            base.SetButtonSelesaiToBatal();
            this._bll  = bll;
            this._role = role;

            txtNamaRole.Text = this._role.nama_role;
            if (this._role.is_active)
            {
                rdoAktif.Checked = true;
            }
            else
            {
                rdoNonAktif.Checked = true;
            }
        }
예제 #5
0
 /// <summary>
 ///  Initializes a new instance of the <see cref="RoleController" /> class.
 /// </summary>
 /// <param name="role"></param>
 public RoleController(IRoleBll role)
 {
     _role = role;
 }
예제 #6
0
 public void CleanUp()
 {
     _bll = null;
 }
예제 #7
0
 public void Init()
 {
     _log = LogManager.GetLogger(typeof(RoleBllTest));
     _bll = new RoleBll(_log);
 }
예제 #8
0
 public LoginController(IResourceBll resourceBll, IUserBll userBll, IRoleBll roleBll)
 {
     _resourceBll = resourceBll;
     _userBll     = userBll;
     _roleBll     = roleBll;
 }
예제 #9
0
 public RoleController(IRoleBll roleBll, IResourceBll resourceBll)
 {
     _roleBll     = roleBll;
     _resourceBll = resourceBll;
 }
 public UserBll(ILogger logger, IRoleBll roleBll, IUserDao userDao)
 {
     _logger  = logger;
     _roleBll = roleBll;
     _userDao = userDao;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RoleBllTest" /> class.
 /// </summary>
 /// <param name="io">The IoCConfig class provide installing all components needed to use.</param>
 public RoleBllTest(IoCConfig io)
 {
     _role   = io.ServiceProvider.GetRequiredService <IRoleBll>();
     _config = io.ServiceProvider.GetRequiredService <IConfigSetting>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuBll" /> class.
 /// </summary>
 /// <param name="unitOfWork">The utilities unit of work.</param>
 public MenuBll(IUnitOfWork unitOfWork, IRoleBll roleBll)
 {
     _unitOfWork = unitOfWork;
     _roleBll    = roleBll;
 }
예제 #13
0
 public UserController(IUserBll userBll, IRoleBll roleBll)
 {
     _userBll = userBll;
     _roleBll = roleBll;
 }