public ActionResult ComboItemEdit(ComboItemViewModel combo) { if (ModelState.IsValid) { _comboService.Update(combo); return(Redirect(Url.Action("Home") + "#specialDeals")); } return(View(combo)); }
public ActionResult ComboSave() { ComboInfo info = SerializationUtility.JsonDeserialize <ComboInfo>(Request.Form["data"]); var loginUser = UserAuthHelper.GetCurrentUser(); info.SellerSysNo = loginUser.SellerSysNo; info.InUserSysNo = loginUser.UserSysNo; info.InUserName = loginUser.UserDisplayName; info.EditUserSysNo = loginUser.UserSysNo; info.EditUserName = loginUser.UserDisplayName; if (info.SysNo > 0) { _comboService.Update(info); return(JsonSuccess(info.SysNo, LanguageHelper.GetText("更新成功。"))); } else { _comboService.Create(info); return(JsonSuccess(info.SysNo, LanguageHelper.GetText("创建成功。"))); } }