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

            Zs_GuoXue item = bGuoXue.Find(model.GxID);
            item = sysFun.InitialEntity<GuoXueEdit, Zs_GuoXue>(model, item);
            item.UpdateDate = DateTime.Now;
            var result = bGuoXue.Update(item);

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

            @ViewBag.GxStatus = DicUtil.Instance.DicGxStatus(model.GxStatus);

            return View(model);
        }