public ActionResult GetDataTongLuotVanChuyen() { List <GraphData> GraphDataList = new List <GraphData>(); HomeHD hd = new HomeHD(); int kehoach = hd.TongLuotVanChuyenKeHoach(); List <int> lis = hd.TongLuotVanChuyenThucTe(); for (int i = 1; i <= DateTime.Now.Day; i++) { GraphDataList.Add(new GraphData("Ngày " + i + "/" + DateTime.Now.Month, lis[i - 1], kehoach)); } return(Json(GraphDataList, JsonRequestBehavior.AllowGet)); }
public ActionResult GetDataKhongThucHien() { HomeHD hd = new HomeHD(); int kehoach = hd.TongLuotVanChuyenKeHoach(); List <int> lis = hd.TongLuotVanChuyenThucTe(); int KhongThucHien = 0; int TongKeHoach = 0; List <dataTemp> lisO = new List <dataTemp>(); for (int i = 1; i <= DateTime.Now.Day; i++) { KhongThucHien += kehoach - lis[i - 1]; TongKeHoach += kehoach; } lisO.Add(new dataTemp("Thực hiện", TongKeHoach)); lisO.Add(new dataTemp("Không thực hiện", KhongThucHien)); return(Json(lisO, JsonRequestBehavior.AllowGet)); }