Пример #1
0
 public bool IsRequestFiltered(RequestEntity request, RequestListFilterEntity filter)
 {
     if (request == null)
     {
         return(true);
     }
     if (filter == null)
     {
         return(false);
     }
     return(!(StrHlp.Contains(request.Id, filter.RequestId) &&
              DateHlp.Between(request.ReqDateTime, filter.StartDateTime, filter.StopDateTime) &&
              Hlp.EqualsFilter <UserEntity>(request.CreatorUser, filter.CreatorUser) &&
              Hlp.EqualsFilter <UserEntity>(request.ResponseUser, filter.ResponseUser) &&
              Hlp.EqualsFilter <OrgEntity>(request.Organization, filter.Organization) &&
              Hlp.EqualsFilter <AppEntity>(request.Application, filter.Application) &&
              StrHlp.Contains(request.Subject, filter.Subject) &&
              StrHlp.Contains(request.Comments, filter.Comments) &&
              StrHlp.Contains(request.Contact, filter.Contact) &&
              (string.IsNullOrEmpty(filter.StatusIdList) || StrHlp.Contains(filter.StatusIdList, request.StateId.ToStateString()))));
     //(string.IsNullOrEmpty(filter.TagList) || StrHlp.Contains(filter.TagList, request.Ta.ToStateString()));
 }