// GET: Sales public ActionResult Index() { List <PieSeriesData> pieData = new List <PieSeriesData>(); int currentMonth = DateTime.Today.Month; int currentYear = DateTime.Today.Year; ViewData["pieData"] = GetSaleData(currentMonth, currentYear, ""); GetDataList(); FilterSale filterSale = new FilterSale(currentMonth, currentYear, ""); return(View(filterSale)); }
public ActionResult Index(int?SelectedMonth, int?SelectedYear, string SelectedCategory) { int getMonth, getYear; getMonth = SelectedMonth.GetValueOrDefault(); getYear = SelectedYear.GetValueOrDefault(); List <PieSeriesData> pieData = new List <PieSeriesData>(); FilterSale filterSale = new FilterSale(getMonth, getYear, SelectedCategory); GetDataList(); ViewData["pieData"] = GetSaleData(getMonth, getYear, SelectedCategory); return(View(filterSale)); }