Ejemplo n.º 1
0
        public ActionResult Edit(GreenFactoryModel model, string cdts)
        {
            GetConditions(cdts);

            ////檢查內容無障礙是否通過
            if (!AccessibilityUtil.CheckFreeGO(model.Content))
            {
                model.ShowFreeGOMsg    = true;
                model.FreeGOColumnName = "Content";
            }

            model.Update();

            if (model.ShowFreeGOMsg)
            {
                return(View("Save", model));
            }

            return(RedirectToAction("AdminIndex", new { Page = model.Page, Cdts = cdts }));
        }
Ejemplo n.º 2
0
        public ActionResult Create(GreenFactoryModel model, string cdts)
        {
            GetConditions(cdts);

            ////檢查內容無障礙是否通過
            if (!AccessibilityUtil.CheckFreeGO(model.Content))
            {
                model.ShowFreeGOMsg    = true;
                model.FreeGOColumnName = "Content";
            }

            model.Insert();

            if (model.ShowFreeGOMsg)
            {
                return(View("Save", model));
            }

            return(View("AdminIndex"));
        }