コード例 #1
0
        public ActionResult GetList()
        {
            List <Hashtable> data = new List <Hashtable>();

            foreach (ScheduleEntity entity in schedulebll.GetMyList("").ToList())
            {
                Hashtable ht = new Hashtable();
                ht["id"]     = entity.ScheduleId;
                ht["title"]  = entity.ScheduleContent;
                ht["end"]    = (entity.EndDate.ToDate().ToString("yyyy-MM-dd") + " " + entity.EndTime.Substring(0, 2) + ":" + entity.EndTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm:ss");
                ht["start"]  = (entity.StartDate.ToDate().ToString("yyyy-MM-dd") + " " + entity.StartTime.Substring(0, 2) + ":" + entity.StartTime.Substring(2, 2)).ToDate().ToString("yyyy-MM-dd HH:mm:ss");
                ht["allDay"] = false;
                data.Add(ht);
            }
            return(ToJsonResult(data));
        }