public ActionResult ChuanJiaEdit(ChuanJiaEdit model) { if (!ModelState.IsValid) { return View(model); } Zs_ChuanJia item = bChuanJia.Find(model.CJID); item = SysFun.Instance.InitialEntity<ChuanJiaEdit, Zs_ChuanJia>(model, item); item.UpdateDate = DateTime.Now; var result = bChuanJia.Update(item); if (result) return RedirectToAction("ChuanJiaList"); else return View(model); }
/// <summary> /// 编辑 /// </summary> /// <returns></returns> public ActionResult ChuanJiaEdit(int id = 0) { var item = bChuanJia.Find(id); var model = new ChuanJiaEdit(); model = SysFun.Instance.InitialEntity<Zs_ChuanJia, ChuanJiaEdit>(item, model); @ViewBag.TypeID = DicUtil.Instance.DicCJType(model.TypeID); @ViewBag.OpenStatus = DicUtil.Instance.DicOpenStatus(model.OpenStatus); return View(model); }