public override string QueryResult() { JsonModel jsonModel = new JsonModel(); try { ParamModel paramModel = Newtonsoft.Json.JsonConvert.DeserializeObject <ParamModel>(this.Data); TF.RunSafty.BLL.Tab_Config_LED_Class_Order bllPlace = new TF.RunSafty.BLL.Tab_Config_LED_Class_Order(); List <TF.RunSafty.Model.Tab_Config_LED_Class_Order> recordList = bllPlace.GetTrainnosOfTrainJiaolu(paramModel.strClientGUID); jsonModel.result = 0; jsonModel.resultStr = "提交成功"; jsonModel.Convert(recordList); } catch (Exception ex) { TF.CommonUtility.LogClass.logex(ex, ""); jsonModel.result = 1; jsonModel.resultStr = "提交失败" + ex.Message; } Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式 timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; return(Newtonsoft.Json.JsonConvert.SerializeObject(jsonModel, timeConverter)); }
public override string QueryResult() { JsonModel jsonModel = new JsonModel(); try { ParamModel paramModel = Newtonsoft.Json.JsonConvert.DeserializeObject <ParamModel>(this.Data); TF.RunSafty.BLL.Plan.TAB_Plan_Train bll_Plan_Train = new TF.RunSafty.BLL.Plan.TAB_Plan_Train(); List <TF.RunSafty.Model.TrainManPlanforLed> placeList = bll_Plan_Train.GetPlanTrain(paramModel.strClientGUID, paramModel.strMinute); jsonModel.result = 0; jsonModel.resultStr = "提交成功"; jsonModel.Convert(placeList); } catch (Exception ex) { TF.CommonUtility.LogClass.logex(ex, ""); jsonModel.result = 1; jsonModel.resultStr = "提交失败" + ex.Message; } Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式 timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; return(Newtonsoft.Json.JsonConvert.SerializeObject(jsonModel, timeConverter)); }