public ActionResult Save(ShopPayWay entity) { var json = new JsonHelp(); try { if (entity.ID == 0) { json.IsSuccess = DB.ShopPayWay.Insert(entity); json.Msg = "添加"; } else { json.IsSuccess = DB.ShopPayWay.Update(entity); json.Msg = "修改"; } if (json.IsSuccess) { json.ReUrl = ControllerPath + "/Index"; //注册成功就跳转到 激活页 json.Msg += "成功"; } else { json.Msg += "失败"; } } catch (Exception e) { json.IsSuccess = false; json.Msg = "操作失败"; LogHelper.Error("保存支付方式失败:" + WebTools.getFinalException(e)); } return(Json(json)); }
public ActionResult Detail(int?id) { ShopPayWay entity = null; if (id == null) { entity = new ShopPayWay(); } else { entity = DB.ShopPayWay.FindEntity(id); } return(View(entity)); }