public SOWIssueListModel Get(SOWIssueSearchFilter searchFilter)
        {
            SOWIssueListFormData       formData     = new SOWIssueListFormData();
            SearchResult <SOWIssueDTO> searchResult = sowIssueQuery.Search(searchFilter);

            return(new SOWIssueListModel()
            {
                FormData = formData,
                SearchResult = searchResult
            });
        }
Beispiel #2
0
        public IHttpActionResult Search([FromUri] SOWIssueSearchFilter filter)
        {
            string accessType = "SOWIssue_ViewAll";

            ThrowIfUserHasNoRole(accessType);
            if (filter == null)
            {
                throw new KairosException("Missing search filter parameter");
            }

            using (var sowIssueQuery = new SOWIssueQuery(Db))
            {
                var data           = sowIssueQuery.Search(filter);
                var mobileResponse = data.Records.Select(x => new
                {
                    issueId = x.SOWIssue_PK,
                    date    = x.CreatedDate.ToString("dd-MM-yyyy"),
                    content = x.Description,
                    photo   = x.FilePhotoInBase64,
                });
                return(Ok(mobileResponse));
            }
        }