public HttpResponseBase GetChangeLogDetailList() { string json = "{success:false,data:0}"; try { _proCommentImpl = new ProductCommentMgr(mySqlConnectionString); int pk_id = 0; int comment_id_display = 0; string create_time = string.Empty; if (!string.IsNullOrEmpty(Request.Params["pk_id"])) { pk_id = Convert.ToInt32(Request.Params["pk_id"]); } if (!string.IsNullOrEmpty(Request.Params["create_time"])) { create_time = CommonFunction.DateTimeToString(Convert.ToDateTime(Request.Params["create_time"])); } if (!string.IsNullOrEmpty(Request.Params["comment_id_display"])) { comment_id_display = Convert.ToInt32(Request.Params["comment_id_display"]); } BLL.gigade.Model.Custom.TableChangeLogCustom store = _proCommentImpl.GetChangeLogDetailList(pk_id,comment_id_display, create_time); IsoDateTimeConverter timeConverter = new IsoDateTimeConverter(); //这里使用自定义日期格式,如果不使用的话,默认是ISO8601格式 timeConverter.DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; json = "{success:true,data:" + JsonConvert.SerializeObject(store, 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); } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }