public ActionResult Details(Guid id) { var info = service.GetById(id); var model = new ActivitysModel().ToModel(info); return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model)); }
public ActionResult Create(ActivitysModel 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) { ActivitysModel model = new ActivitysModel(); 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 ActivitiesState(Guid id, string State) { ActivitysModel model = new ActivitysModel(); var info = service.GetById(id); if (info != null) { info.ActityState = DataDictionaryHelper.GetDictionary(State).Id; service.UpdateGoogleProductRecord(info); return(Json(new AjaxResult() { Result = Result.Success, Message = "操作成功" })); } return(View(PluginHelper.GetViewPath(this.GetType(), "ActivitiesState"), model)); }
public ActionResult Edit(ActivitysModel 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) { ActivitysModel model = new ActivitysModel(); 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 ActivitysModel(); return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model)); }