Beispiel #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));
        }
Beispiel #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));
 }
Beispiel #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));
        }
Beispiel #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));
 }
Beispiel #5
0
        public ActionResult Create()
        {
            var model = new FormDownloadModel();

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