コード例 #1
0
        public ActionResult RightEdit(RightEdit model)
        {
            if (!ModelState.IsValid) { return View(model); }

            Zs_Right item = bRight.Find(model.RightID);
            item = sysFun.InitialEntity<RightEdit, Zs_Right>(model, item);
            var result = bRight.Update(item);

            if (result) return RedirectToAction("RightList");
            else return View(model);
        }
コード例 #2
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <returns></returns>
        public ActionResult RightEdit(int id = 0)
        {
            var item = bRight.Find(id);
            var model = new RightEdit();
            model = sysFun.InitialEntity<Zs_Right, RightEdit>(item, model);

            return View(model);
        }