/// <summary> /// Function Get All OT List /// </summary> /// <param name="userID"></param> /// <param name="groupId"></param> /// <returns></returns> /// public IEnumerable <ListOTModel> GetAllWithUser(string userID, string groupID, FilterOTRequestModel filter) { if (_otrequestRepository.IsReadAll(userID, CommonConstants.FunctionOTList)) { return(_otrequestRepository.GetAllUser(userID, groupID, true).OrderBy(x => x.FullName).Where(x => x.OTCheckIn != null && x.OTCheckOut != null && x.StatusRequest == CommonConstants.StatusApproved)); } return(_otrequestRepository.GetAllUser(userID, groupID, false).OrderBy(x => x.OTDate).Where(x => x.OTCheckIn != null && x.OTCheckOut != null && x.StatusRequest == CommonConstants.StatusApproved)); }
public void ListOT_Repository_IsReadAllUT1() { var result = listOTRepository.IsReadAll(UserID1, CommonConstants.FunctionOTList); Assert.AreEqual(true, result); }