/// <summary>
        /// 加载用户组信息数据
        /// </summary>
        private void GetUserGrouptInfo()
        {
            #region  除垃圾数据
            while (_fpUserGroupInfo.ActiveSheet.Rows.Count > _fpRowsTitleCount)
            {
                _fpUserGroupInfo.ActiveSheet.Rows.Remove(_fpRowsTitleCount, 1);
            }
            #endregion

            //从数据库中获取用户组信息值
            DataTable dt = UserGroupInformationManagementBLL.GetUserGroupInformation();

            if (dt != null)
            {
                //记录条数
                int n = dt.Rows.Count;
                //记录列数
                int k = dt.Columns.Count;

                for (int i = 0; i < n; i++)
                {
                    this._fpUserGroupInfo.ActiveSheet.Rows.Add(i + _fpRowsTitleCount, 1);
                    for (int j = 0; j < k; j++)
                    {
                        //设置单元格类型
                        this._fpUserGroupInfo.Sheets[0].Cells[i + 2, j + 1].CellType = new FarPoint.Win.Spread.CellType.TextCellType();
                        //锁定单元格
                        this._fpUserGroupInfo.Sheets[0].Cells[i + 2, j + 1].Locked = true;
                        //设置单元格的值
                        this._fpUserGroupInfo.Sheets[0].Cells[i + 2, j + 1].Text = dt.Rows[i][j].ToString();
                        //设置单元格对其方式
                        this._fpUserGroupInfo.Sheets[0].Cells[i + 2, j + 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
                        this._fpUserGroupInfo.Sheets[0].Cells[i + 2, j + 1].VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Center;
                    }

                    //设置选择单元格的类型与对其方式
                    this._fpUserGroupInfo.Sheets[0].Cells[i + 2, 0].CellType            = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
                    this._fpUserGroupInfo.Sheets[0].Cells[i + 2, 0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
                    this._fpUserGroupInfo.Sheets[0].Cells[i + 2, 0].VerticalAlignment   = FarPoint.Win.Spread.CellVerticalAlignment.Center;
                }
            }

            //设置焦点
            this._fpUserGroupInfo.ActiveSheet.SetActiveCell(1, 0);
        }
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOK_Click(object sender, EventArgs e)
        {
            //解决确定后窗体关闭问题
            DialogResult = DialogResult.None;
            //用户组名称
            string name = _txtGroupName.Text.ToString().Trim();

            //检查用户组名称不能为空,不能重复
            if (LibCommon.Validator.checkSpecialCharacters(name) || LibCommon.Validator.IsEmpty(name) || UserGroupInformationManagementBLL.FindTheSameGroupName(name))
            {
                Alert.alert(LibCommon.Const.USER_GROUP_NAME_IS_WRONG, LibCommon.Const.NOTES, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //设置焦点
                _txtGroupName.Focus();
                return;
            }
            //选择用户的数量
            int userCount = _lstSelUserName.Items.Count;

            //定义用户组信息实体
            LibEntity.UserGroup ent = new LibEntity.UserGroup();
            //组名
            ent.GroupName = _txtGroupName.Text.ToString().Trim();
            //人数
            ent.UserCount = userCount.ToString();
            //备注
            ent.Remark = _rtxtRemarks.Text.ToString().Trim();
            //插入数据库
            UserGroupInformationManagementBLL.InsertRecordIntoTableUserGroupInformation(ent);

            //修改用户登录信息表中记录的组名
            for (int i = 0; i < userCount; i++)
            {
                UserGroupInformationManagementBLL.ChangeUserGroup(ent.GroupName, _lstSelUserName.Items[i].ToString());
            }

            DataTable dt = UserGroupInformationManagementBLL.GetUserGroupInformation();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                UserGroupInformationManagementBLL.UpdateUserCountFromUserGroup(dt.Rows[i][UserGroupInformationMangementDbConstNames.USER_GROUP_NAME].ToString());
            }
            this.Close();
        }