public ActionResult AgendaWeekDay() { ViewBag.focusMillis = KTDateTime.ConvertDateTimeInt(DateTime.Now); ViewBag.defaultid = this.UserID; // 获取数据 return(View()); }
private string GetAgendaList(AgendaParams agendaParams) { DateTime focusTime = agendaParams.focusMillis == null ? DateTime.Now : KTDateTime.ConvertIntDateTime(Convert.ToDouble(agendaParams.focusMillis)); TimeRangeEnum timeRangeEnum = (TimeRangeEnum)Enum.Parse(typeof(TimeRangeEnum), agendaParams.type.ToUpper()); DateTime[] arrTimes = KTDateTime.GetTimeRange(timeRangeEnum, focusTime); agendaParams.fromTime = arrTimes[0]; agendaParams.toTime = arrTimes[1]; IEnumerable <AgendaView> list = agendaService.GetList(agendaParams); XmlDocument doc = new XmlDocument(); var obj = new { ok = true, events = list }; string returnstr = Newtonsoft.Json.JsonConvert.SerializeObject(obj); return(returnstr); }