public List <DetailReport> Detail(string year = "2016", string month = "1", string day = "1")
        {
            List <DetailReport> dreports;

            GetReport getrep = new GetReport();

            dreports = getrep.getDayDetailInfo(year, month, day);
            return(dreports);
        }
Beispiel #2
0
        public ActionResult Report(string type = "year", string thisyear = "2016", string month = "1", string day = "1")
        {
            GetReport getrep = new GetReport();

            RangeDate range = getrep.getRange();

            char[] split_char = new char[] { '/' };

            string[] param = range.enddate.Split(split_char);


            ViewBag.Year  = thisyear;
            ViewBag.Month = month;
            ViewBag.Day   = day;
            ViewBag.type  = type;

            List <Reports> reports;

            if (type == "year")
            {
                reports = getrep.getMonthInfo(thisyear);
            }
            else if (type == "month")
            {
                reports = getrep.getWeekInfo(thisyear, month);
            }
            else if (type == "day")
            {
                reports = getrep.getDayInfo(thisyear, month);
            }
            else
            {
                List <DetailReport> dreports;

                dreports = getrep.getDayDetailInfo(thisyear, month, day);
                return(View("Detail", dreports));
            }
            return(View(reports));
        }