Esempio n. 1
0
        public ActionResult GetLineChartData(int?y)
        {
            ReqList     r    = new ReqList();
            DataSet     ds   = r.Get_Months(y);
            List <PoVM> list = new List <PoVM>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                list.Add(new PoVM
                {
                    month = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedMonthName(Convert.ToInt32(dr["month"])),
                    total = Convert.ToDecimal(dr["Total"])
                });
            }
            return(Json(list, JsonRequestBehavior.AllowGet));
        }