/// <summary> /// 向数据库插入新的数据 /// </summary> public void Comfirm() { Logger.Instance.WriteLog("保存用户组信息"); GroupDao gpDao = new GroupDao(); gpDao.Insert001(IPTGroupName.value); if (Authoritys) { gpDao.Select004(IPTGroupName.value); string groupId = gpDao.Result [0].Id; GroupAuthorityDao gaDao = new GroupAuthorityDao(); AuthorityItem[] AuthorityItems = Authoritys.GetComponentsInChildren <AuthorityItem>(); foreach (AuthorityItem item in AuthorityItems) { if (item.isSelected) { gaDao.Insert001(groupId, item.AuthInfo.Id); } } } GroupRecordManage.Instance.ReloadGroupRecord(); Close(); }