} // 獲取 master數據 public HttpResponseBase GetScheduleConfigList() { string json = string.Empty; ScheduleConfigQuery query = new ScheduleConfigQuery(); if (!string.IsNullOrEmpty(Request.Params["schedule_code"])) { query.schedule_code = Request.Params["schedule_code"]; } try { List<ScheduleConfigQuery> ipodStore = new List<ScheduleConfigQuery>(); _secheduleServiceMgr = new ScheduleServiceMgr(mySqlConnectionString); ipodStore = _secheduleServiceMgr.GetScheduleConfigList(query); IsoDateTimeConverter timeConverter = new IsoDateTimeConverter(); //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式 timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; json = "{success:true,data:" + JsonConvert.SerializeObject(ipodStore, Formatting.Indented, timeConverter) + "}";//返回json數據 } catch (Exception ex) { Log4NetCustom.LogMessage logMessage = new Log4NetCustom.LogMessage(); logMessage.Content = string.Format("TargetSite:{0},Source:{1},Message:{2}", ex.TargetSite.Name, ex.Source, ex.Message); logMessage.MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name; log.Error(logMessage); json = "{success:false,data:[]}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }// 獲取 config數據