/// <summary> /// 保存物流設定 /// </summary> /// <returns></returns> /*[HttpPost]*/ public HttpResponseBase SaveShippingCarrior(ShippingCarrior sc) { string json = string.Empty; try { _shippingCarriorMgr = new ShippingCarriorMgr(connectionString); int rowCount = 0; if (sc.Rid > 0)//修改 { rowCount = _shippingCarriorMgr.Update(sc); } else//新增 { rowCount = _shippingCarriorMgr.Save(sc); } if (rowCount > 0) json = "{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); json = "{success:false}"; } this.Response.Clear(); this.Response.Write(json); this.Response.End(); return this.Response; }