コード例 #1
0
        public ActionResult Add()
        {
            CategoryMappingDO model = new CategoryMappingDO();

            return View(model);
        }
コード例 #2
0
        public ActionResult Add(CategoryMappingDO model, string saveAndNewButton)
        {
            if (ModelState.IsValid == false)
                return View(model);

            int resultID = CategoryMappingBL.Save(model, this.UserID);
            if (string.IsNullOrEmpty(saveAndNewButton) == false)
            {
                return RedirectToAction("Add");
            }

            return RedirectToAction("Edit", new { id = resultID });
        }
コード例 #3
0
        public ActionResult Edit(CategoryMappingDO model)
        {
            if (ModelState.IsValid == false)
            {
                return View(model);
            }

            int resultID = CategoryMappingBL.Update(model, this.UserID);

            return Edit(resultID);
        }