예제 #1
0
        // GET api/<controller>/5
        public Array Get(double start, double end, string custom_param1)
        {
            var ApptListForDate = DiaryEvent.LoadAllAppointmentsInDateRange(start, end, custom_param1);
            var eventList       = from e in ApptListForDate
                                  select new
            {
                id        = e.ID,
                title     = e.Title,
                start     = e.StartDateString,
                end       = e.EndDateString,
                color     = e.StatusColor,
                className = e.ClassName,
                // someKey = e.SomeImportantKeyID,
                allDay = false
            };
            var rows = eventList.ToArray();

            return(rows);
        }
예제 #2
0
        public JsonResult GetDiaryEvents(double start, double end)
        {
            var ApptListForDate = DiaryEvent.LoadAllAppointmentsInDateRange(start, end);
            var eventList       = from e in ApptListForDate
                                  select new
            {
                id        = e.ID,
                title     = e.Title,
                start     = e.StartDateString,
                end       = e.EndDateString,
                color     = e.StatusColor,
                className = e.ClassName,
                someKey   = e.SomeImportantKeyID,
                allDay    = false
            };
            var rows = eventList.ToArray();

            return(Json(rows, JsonRequestBehavior.AllowGet));
        }
 public void Test(double start, double end)
 {
     DiaryEvent diaryEvent      = new DiaryEvent(new YogaSpaceEventRepository());
     var        apptListForDate = DiaryEvent.LoadAllAppointmentsInDateRange(start, end);
 }