Example #1
0
        public ActionResult TimeSheetCalendar(string tc)
        {
            var dateBegin = DateUtils.FirstMonthDay(DateTime.Today);
            var dateEnd   = DateUtils.LastMonthDay(dateBegin.AddMonths(1));
            var lectures  = LectureService.GetLmsLectures(dateBegin, dateEnd, tc.ToUpper());
            var data      = lectures.Select(x => new CalData(x.LectureDateBeg, x.LectureDateEnd,
                                                             x.ClassRoom_TC, x.Course_TC)).ToList();
            var result = EntityUtils.GetCalendar(data);

            return(Content(result, "text/calendar"));
        }