public IzinCutiStatusListModel Get(IzinCutiStatusSearchFilter searchFilter) { IzinCutiStatusListFormData formData = new IzinCutiStatusListFormData(); SearchResult <IzinCutiStatusDTO> searchResult = izinCutiStatusSearch.GetDataByFilter(searchFilter); return(new IzinCutiStatusListModel() { FormData = formData, SearchResult = searchResult }); }
public IHttpActionResult Search([FromUri] IzinCutiStatusSearchFilter filter) { string accessType = "IzinCutiStatus_ViewAll"; ThrowIfUserHasNoRole(accessType); if (filter == null) { throw new KairosException("Missing search filter parameter"); } using (var izinCutiStatusSearch = new IzinCutiStatusSearch(Db)) { var data = izinCutiStatusSearch.GetDataByFilter(filter); return(Ok(new SuccessResponse(data))); } }