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

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

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