// catch (Exception ex) // { // notification.Type = Library.DTO.NotificationType.Error; // notification.Message = ex.Message; // if (ex.InnerException != null && !string.IsNullOrEmpty(ex.InnerException.Message)) // { // notification.DetailMessage.Add(ex.InnerException.Message); // } // return string.Empty; // } //} public DTO.ReportPlcProducts.SupportDataContainer GetSupportData(out Library.DTO.Notification notification) { notification = new Library.DTO.Notification() { Type = Library.DTO.NotificationType.Success }; DAL.Support.DataFactory factory = new Support.DataFactory(); //try to get data try { DTO.ReportPlcProducts.SupportDataContainer dtoItem = new DTO.ReportPlcProducts.SupportDataContainer(); dtoItem.Factories = factory.GetFactory().ToList(); return(dtoItem); } catch (Exception ex) { notification.Type = Library.DTO.NotificationType.Error; notification.Message = ex.Message; if (ex.InnerException != null && !string.IsNullOrEmpty(ex.InnerException.Message)) { notification.DetailMessage.Add(ex.InnerException.Message); } return(new DTO.ReportPlcProducts.SupportDataContainer()); } }
public IHttpActionResult GetFilters() { BLL.ReportPlcProducts bll = new BLL.ReportPlcProducts(); Library.DTO.Notification notification; DTO.ReportPlcProducts.SupportDataContainer result = bll.GetFilters(out notification); return(Ok(new Library.DTO.ReturnData <DTO.ReportPlcProducts.SupportDataContainer>() { Data = result, Message = notification, TotalRows = 0 })); }