public HttpResponseBase Product_Cancel() { string resultStr = "{success:false}"; //初始化數據庫連接 _productTempMgr = new ProductTempMgr(connectionString); try { if (!string.IsNullOrEmpty(Request.Form["Product_Id"])) { string[] pro_Ids = Request.Form["Product_Id"].Split('|'); foreach (string item in pro_Ids.Distinct()) { ProductTemp productTemp = _productTempMgr.GetProTempByVendor(new ProductTemp { Product_Id = item, Temp_Status = 12, Create_Channel = 2 }).FirstOrDefault(); if (productTemp != null) { productTemp.Product_Status = 0; _productTempMgr.CancelVerify(productTemp); } } } resultStr = "{success:true}"; } 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); resultStr = "{success:false}"; } this.Response.Clear(); this.Response.Write(resultStr); this.Response.End(); return this.Response; }