public ActionResult Create(Guid? id, EnumPageState? pageState) { ViewBag.PageState = GetPageState(id, pageState); if (id != null) { //修改供应商信息 ModelSupplierCreate model = new ModelSupplierCreate(); model.UTSupplier = bizUTSupplier.GetByID<Guid>(id.Value); return View(model); } return View(); }
public ActionResult Create(ModelSupplierCreate model) { try { model.Save(); return Content(WebTools.ScriptCloseDialog); } catch { Error = "操作失败"; ViewBag.PageState = PageState; return View(model); } }