예제 #1
0
 public ChecklistController(IChecklistService checklistService, IChecklistDetailService checklistDetailService, IStaffService staffService, IMasterDataService masterDataService, ITableColumnService tableColumnService, ILocalizationService localizationService, IEmailService emailService, IAttachmentService attachmentService)
 {
     _checklistService       = checklistService;
     _checklistDetailService = checklistDetailService;
     _staffService           = staffService;
     _masterDataService      = masterDataService;
     _tableColumnService     = tableColumnService;
     _localizationService    = localizationService;
     _emailService           = emailService;
     _attachmentService      = attachmentService;
     _languageId             = CurrentUser.LanguageId;
     _userId = CurrentUser.UserId;
     _roleId = CurrentUser.RoleId;
 }
예제 #2
0
        public List <ChecklistDetailModel> GetChecklistDetailByStaffId(IChecklistDetailService checklistDetailService, long staffId)
        {
            var response = checklistDetailService.GetChecklistDetailByStaffId(staffId);
            var result   = JsonConvert.DeserializeObject <HrmResultModel <ChecklistDetailModel> >(response);

            if (!CheckPermission(result))
            {
                //return to Access Denied
            }
            else
            {
                return(result.Results);
            }
            return(new List <ChecklistDetailModel>());
        }