Exemple #1
0
        public ActionResult GetCustomerReport(string customerNo)
        {
            var yearData   = new BaseServices <Published>().LoadEntities(c => c.CustomerNo == customerNo && c.PublishTime.Year.Equals(DateTime.Now.Year)).ToList();
            var sbCustomer = new StringBuilder("[");

            for (int i = 1; i <= 12; i++)
            {
                sbCustomer.Append($"[{i},{yearData.Count(c => c.PublishTime.Month == i)}],");
            }

            sbCustomer.Append("]");

            return(Json(sbCustomer.ToString(), JsonRequestBehavior.AllowGet));
        }