public HttpResponseBase QueryPriceVerifyList() { string json = string.Empty; JavaScriptSerializer jsSer = new JavaScriptSerializer(); int startPage = Convert.ToInt32(Request.Form["start"] ?? "0"); int endPage = Convert.ToInt32(Request.Form["limit"] ?? "10"); QueryVerifyCondition qvCon = new QueryVerifyCondition(); if (!string.IsNullOrEmpty(Request.Params["queryCondition"])) { qvCon = jsSer.Deserialize<QueryVerifyCondition>(Request.Params["queryCondition"]); } qvCon.Start = startPage; qvCon.Limit = endPage; string time_start = string.Empty; string time_end = string.Empty; if (!string.IsNullOrEmpty(Request.Params["time_start"])) { if (qvCon.date_type == "apply_time")//time 為整形 { time_start = CommonFunction.GetPHPTime(Request.Params["time_start"]).ToString(); //time_end = CommonFunction.GetPHPTime(Request.Params["time_end"]).ToString(); } else { time_start = Request.Params["time_start"]; //time_end = Request.Params["time_end"]; } qvCon.time_start = time_start; } if (!string.IsNullOrEmpty(Request.Params["time_end"])) { if (qvCon.date_type == "apply_time")//time 為整形 { time_start = CommonFunction.GetPHPTime(Request.Params["time_end"]).ToString(); } else { time_start = Request.Params["time_end"]; } qvCon.time_end = time_end; } int total = 0; _productMgr = new ProductMgr(connectionString); try { List<QueryandVerifyCustom> qvCusList = _productMgr.QueryandVerify(qvCon, ref total); foreach (QueryandVerifyCustom item in qvCusList) { if (item.product_image != "") { item.product_image = imgServerPath + prod50Path + GetDetailFolder(item.product_image) + item.product_image; } else { item.product_image = defaultImg; } } json = "{success:true,total:" + total + ",data:" + JsonConvert.SerializeObject(qvCusList) + "}"; } 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; }