コード例 #1
0
        public IActionResult GetSalesItemBranchReportLastMonth([FromQuery] int?branchId, [FromQuery] int?code)
        {
            // input validation
            if (code == null)
            {
                return(BadRequest("Code must not be null; you must input a code"));
            }

            // Set the filter to "LastMonth"
            var filter = new SalesItemBranchReportFilterDto();

            filter.SetLastMonth();
            filter.Code = code;

            // Return to response
            var listToReturn = GetSalesItemBranchReport(filter);

            return(Ok(listToReturn));
        }