public ActionResult CatalogHotest() { var lstData = new StatisticalDao().catalogHotest(4); return(Json(new { data = lstData }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetAllCatalog(string seach, int brandid, int typeid, int month, int page, int pageSize) { var result = new StatisticalDao().GetAllCatalog(seach, brandid, typeid, month, page, pageSize); return(Json(new { totalMoney = result.Total, totalRow = result.TotalRecord, data = result.Items }, JsonRequestBehavior.AllowGet)); }
public ActionResult CatalogTypeChart() { int month = DateTime.Now.Month; int slMobile = new StatisticalDao().GetAllCatalog("", 0, 1, month, 1, 1).TotalRecord; int slLaptop = new StatisticalDao().GetAllCatalog("", 0, 2, month, 1, 1).TotalRecord; return(Json(new { slMobile, slLaptop }, JsonRequestBehavior.AllowGet)); }
public ActionResult CatalogChart() { List <double> lstcost = new List <double>(); for (int i = 1; i < 13; i++) { var lstData = new StatisticalDao().GetAllCatalog("", 0, 0, i, 1, 1); lstcost.Add(lstData.Total); } return(Json(new { data = lstcost }, JsonRequestBehavior.AllowGet)); }
// GET: Admin/Statistical public ActionResult Index() { StatisticalDao dao = new StatisticalDao(); //Gán tổng khách hàng ViewBag.TotalCustomer = dao.TotalCustomer(); //Gán tổng doanh thu ViewBag.TotalMoney = dao.TotalMoney(); //Gán số lượng sản phẩm đã bán ViewBag.SalesedQuantity = dao.SalesedQuantity(); //Gán số lượng sản phẩm còn lại ViewBag.RemainingQuantity = dao.RemainingQuantity(); //Gán phần trăm tổng doanh thu theo từng tháng của năm ViewBag.TotalMoneyWithMonth = JsonConvert.SerializeObject(dao.TotalMoneyWithMonth()); return(View()); }