public IHttpActionResult GetStockOverview_HTMLView(Hashtable filters)
        {
            Library.DTO.Notification notification;
            Module.Framework.BLL     fwBll = new Module.Framework.BLL();
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }
            BLL.ReportStockOverview bll = new BLL.ReportStockOverview();
            List <DTO.ReportStockOverview.StockOverview> data = bll.GetStockOverview_HTMLView(filters, ControllerContext.GetAuthUserId(), out notification);

            return(Ok(new Library.DTO.ReturnData <List <DTO.ReportStockOverview.StockOverview> >()
            {
                Data = data, Message = notification
            }));
        }
Beispiel #2
0
        public IHttpActionResult GetReportData()
        {
            Library.DTO.Notification notification;

            // authentication
            Module.Framework.BLL fwBll = new Module.Framework.BLL();
            if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead))
            {
                return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)));
            }

            BLL.ReportStockOverview bll = new BLL.ReportStockOverview();
            string dataFileName         = bll.GetStockOverviewWithDetail(ControllerContext.GetAuthUserId(), out notification);

            if (notification.Type == Library.DTO.NotificationType.Error)
            {
                return(InternalServerError(new Exception(notification.Message)));
            }
            return(Ok(new Library.DTO.ReturnData <string>()
            {
                Data = dataFileName, Message = notification
            }));
        }