Esempio n. 1
0
        public HttpResponseMessage GetOrderStatics()
        {
            ResultMsg resultMsg = new ResultMsg();

            try
            {
                using (IT_Order repository = new T_OrderRepository())
                {
                    var list = repository.GetOrderStatics();

                    resultMsg.data = new { orderDate = list.Select(c => c.OrderDate).ToList(), orderCount = list.Select(c => c.OrderCount).ToList(), orderAmount = list.Select(c => c.OrderAmount).ToList(), total = repository.GetOrderStaticsData() };
                }
            }
            catch (Exception ex)
            {
                resultMsg.code = (int)StatusCodeEnum.Error;
                resultMsg.msg  = ex.Message;
            }
            return(resultMsg.toJson());
        }