示例#1
0
        public IActionResult GetReport(string divisionId, string unit, string category, DateTime?dateFrom, DateTime?dateTo, int page, int size, string Order = "{}")
        {
            int    offset = Convert.ToInt32(Request.Headers["x-timezone-offset"]);
            string accept = Request.Headers["Accept"];

            //try
            //{

            var data = _facade.GetTotalPurchaseBySupplierReport(divisionId, unit, category, dateFrom, dateTo, offset);

            return(Ok(new
            {
                apiVersion = ApiVersion,
                data = data,
                message = General.OK_MESSAGE,
                statusCode = General.OK_STATUS_CODE
            }));
            //}
            //catch (Exception e)
            //{
            //	Dictionary<string, object> Result =
            //		new ResultFormatter(ApiVersion, General.INTERNAL_ERROR_STATUS_CODE, e.Message)
            //		.Fail();
            //	return StatusCode(General.INTERNAL_ERROR_STATUS_CODE, Result);
            //}
        }