public ActionResult Create(ModelSysUserTypeManageCreate model, FormCollection collection) { try { model.Save(); var option = DialogOption.GetDefaultInstance(); option.IsRefreshParentAsynchronous = false; return Content(WebTools.ScriptCloseDialog(option)); } catch { Error = Resources.Properties.Resources.M00002E; model.RetriveData(); return View(model); } }
/// <summary> /// 新增或修改角色 /// </summary> /// <returns></returns> public ActionResult Create(ModelSysUserTypeManageCreate model) { model.RetriveData(); return View(model); }
/// <summary> /// 验证用户类型名称是否已经存在 /// </summary> public ActionResult RemoteCheckUserTypeName(ModelSysUserTypeManageCreate model) { if (model.SysUserType.ID != null) return bizSysUserType.CountBy(x => x.ID != model.sysUserTypeID && x.Name == model.SysUserType.Name) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet); else return true ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet); }