public void UpdateRoleAccess(RoleAccessViewModel roleAccess)
        {
            if (!Validate(roleAccess.RoleId, roleAccess.ApplicationModulId, roleAccess.Id)) return;

            RoleAccess entity = _roleAccessRepository.GetById(roleAccess.Id);
            Map(roleAccess, entity);
            _roleAccessRepository.AttachNavigation(entity.ApplicationModul);
            _roleAccessRepository.AttachNavigation(entity.Role);
            _roleAccessRepository.Update(entity);
            _unitOfWork.SaveChanges();
        }
 public override void RefreshDataView()
 {
     if (!bgwMain.IsBusy)
     {
         MethodBase.GetCurrentMethod().Info("Fecthing role access data...");
         _selectedRoleAccess = null;
         FormHelpers.CurrentMainForm.UpdateStatusInformation("Memuat data role access...", false);
         bgwMain.RunWorkerAsync();
     }
 }
 private void gvRoleAccess_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     _selectedRoleAccess = gvRoleAccess.GetFocusedRow() as RoleAccessViewModel;
 }
 public void DeleteRoleAccess(RoleAccessViewModel roleAccess)
 {
     RoleAccess selectedRoleAccess = _roleAccessRepository.GetById(roleAccess.Id);
     _roleAccessRepository.Delete(selectedRoleAccess);
     _unitOfWork.SaveChanges();
 }