/// <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_IsReadAllUT3() { var list = listOTRepository.GetAllUser(UserID1, groupID1, true); Assert.AreEqual(13, list.Count); }