public ActionResult Details(Guid id) { var info = service.GetById(id); var model = new ActivityStyleModel().ToModel(info); return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model)); }
public ActionResult ActivityStyleDetails(Guid id) { ServiceTemplate service = new ServiceTemplate(); var info = service.GetbyActivityStyle(id); var model = new ActivityStyleModel().ToModel(info); ViewBag.count = service.GetByMessageManagements(id); //ViewBag.MessageManagements = service.GetMessageManagementsList(id); return(View(model)); }
public ActionResult Create(ActivityStyleModel model) { if (ModelState.IsValid) { model.IsTop = false; service.InsertGoogleProductRecord(model.ToInfo()); return(Json(new AjaxResult() { Result = Result.Success, Message = "操作成功" })); } return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model)); }
public ActionResult Delete(Guid id) { ActivityStyleModel model = new ActivityStyleModel(); var info = service.GetById(id); if (info != null) { info.IsDelete = true; service.UpdateGoogleProductRecord(info); return(Json(new AjaxResult() { Result = Result.Success, Message = "操作成功" })); } return(View(PluginHelper.GetViewPath(this.GetType(), "Delete"), model)); }
public ActionResult Edit(ActivityStyleModel model) { if (ModelState.IsValid) { var info = service.GetById(model.Id); if (info != null) { info = model.FormData(info); service.UpdateGoogleProductRecord(info); return(Json(new AjaxResult() { Result = Result.Success, Message = "操作成功" })); } } return(View(PluginHelper.GetViewPath(this.GetType(), "Edit"), model)); }
public ActionResult UpIsTop(Guid id, bool IsTop) { ActivityStyleModel model = new ActivityStyleModel(); var info = service.GetById(id); if (info != null) { info.IsTop = IsTop; info.UpdateDate = DateTime.Now; service.UpdateGoogleProductRecord(info); return(Json(new AjaxResult() { Result = Result.Success, Message = "操作成功" })); } return(View(PluginHelper.GetViewPath(this.GetType(), "UpIsTop"), model)); }
public ActionResult Create() { var model = new ActivityStyleModel(); return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model)); }