コード例 #1
0
        public ActionResult GetEvents()
        {
            var events = GoogleCalendarSyncer.GetEvents(this);

            //return Json(events, JsonRequestBehavior.AllowGet);
            return(View(events));
        }
コード例 #2
0
        public JsonResult GetNextEvent()
        {
            var events    = GoogleCalendarSyncer.GetEvents(this);
            var nextEvent = events.Where(x => x.Start.DateTime.HasValue)
                            .Select(x => new { start = x.Start.DateTimeRaw, title = x.Summary })
                            .OrderBy(x => x.start).FirstOrDefault();

            return(Json(nextEvent, JsonRequestBehavior.AllowGet));
        }