Exemplo n.º 1
0
        public IHttpActionResult Gets(DTO.Search searchInput)
        {
            // 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.WarehouseTransportMng bll = new BLL.WarehouseTransportMng();
            Library.DTO.Notification  notification;
            int totalRows = 0;
            IEnumerable <DTO.WarehouseTransportMng.WarehouseTransportSearch> searchResult = bll.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification);

            return(Ok(new Library.DTO.ReturnData <IEnumerable <DTO.WarehouseTransportMng.WarehouseTransportSearch> >()
            {
                Data = searchResult, Message = notification, TotalRows = totalRows
            }));
        }