public IHttpActionResult Search([FromUri] POSearchFilter filter) { //string accessType = "PO_ViewAll"; //ThrowIfUserHasNoRole(accessType); if (filter == null) { throw new KairosException("Missing search filter parameter"); } using (var poSearch = new POSearch(Db)) { var data = poSearch.GetDataByFilter(filter); return(Ok(new SuccessResponse(data))); } }
public HttpResponseMessage Export([FromBody] POSearchFilter filter) { //string accessType = "PO_ViewAll"; //ThrowIfUserHasNoRole(accessType); if (filter == null) { throw new KairosException("Missing search filter parameter"); } using (var poSearch = new POSearch(Db)) { var data = poSearch.GetDataByFilter(filter); AbstractDataExportBridge expor = new AbstractDataExportBridge(); //expor.WriteData<PODTO>(data.Records); return(expor.Export <PODTO>(data.Records, "PoUpload", "POUpload")); } }
public POListDataProvider(GlobalSolusindoDb db, tblM_User user, POSearch pOSearch) : base(db, user) { this.POSearch = pOSearch; }