public ActionResult Add(AdminGroupModel model) { if (AdminGroups.GetAdminGroupIdByTitle(model.AdminGroupTitle) > 0) { ModelState.AddModelError("AdminGroupTitle", "名称已经存在"); } if (ModelState.IsValid) { AdminGroupInfo adminGroupInfo = new AdminGroupInfo() { Title = model.AdminGroupTitle, ActionList = CommonHelper.StringArrayToString(model.ActionList).ToLower() }; AdminGroups.CreateAdminGroup(adminGroupInfo); AddAdminOperateLog("添加管理员组", "添加管理员组,管理员组为:" + model.AdminGroupTitle); return(PromptView("管理员组添加成功")); } Load(); return(View(model)); }