public ActionResult Details(Guid id) { var info = service.GetById(id); var model = new FormDownloadModel().ToModel(info); return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model)); }
public ActionResult Create(FormDownloadModel model) { if (ModelState.IsValid) { 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) { FormDownloadModel model = new FormDownloadModel(); 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(FormDownloadModel 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 Create() { var model = new FormDownloadModel(); return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model)); }