예제 #1
0
        public ActionResult Details(Guid id)
        {
            var info  = service.GetById(id);
            var model = new FormDownloadModel().ToModel(info);

            return(View(PluginHelper.GetViewPath(this.GetType(), "Details"), model));
        }
예제 #2
0
 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));
 }
예제 #3
0
        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));
        }
예제 #4
0
 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));
 }
예제 #5
0
        public ActionResult Create()
        {
            var model = new FormDownloadModel();

            return(View(PluginHelper.GetViewPath(this.GetType(), "Create"), model));
        }