//*****************************************************
    //  Function Name:  QueryRecordInfo
    /// <summary>
    /// 根据条件查询记录
    /// </summary>
    //  Writer:         王景璐
    //  Create Date:    2007/04/09
    //******************************************************
    private void QueryRecordInfo()
    {
        htInputParameter = new Hashtable();
        dsRecordInfo     = new DataSet();
        htInputParameter.Add(ConstantsManager.QUERY_DATASET_NAME, dsRecordInfo);
        htInputParameter.Add(ConstantsManager.MESSAGE_ID, "");

        if (Request["Sort"] == "" || Request["Sort"] == null)
        {
            htInputParameter.Add("Sort", DEFAULT_SORT);
        }
        else
        {
            htInputParameter.Add("Sort", Request["Sort"]);
        }
        if (Request["SortField"] == "" || Request["SortField"] == null)
        {
            htInputParameter.Add("SortField", DEFAULT_SORT_FIELD);
        }
        else
        {
            htInputParameter.Add("SortField", Request["SortField"]);
        }
        if (DataValidateManager.ValidateIsNull(ViewState["PageSize"]) == true)
        {
            htInputParameter.Add("PageSize", DEFAULT_PAGE_SIZE);
        }
        else
        {
            htInputParameter.Add("PageSize", ViewState["PageSize"].ToString());
        }
        if (DataValidateManager.ValidateIsNull(ViewState["CurrentPage"]) == true)
        {
            htInputParameter.Add("CurrentPage", DEFAULT_CURRENT_PAGE);
        }
        else
        {
            htInputParameter.Add("CurrentPage", ViewState["CurrentPage"].ToString());
        }

        if (DataValidateManager.ValidateIsNull(ViewState["ObjectID"]) == false)
        {
            htInputParameter.Add("ObjectID", ViewState["ObjectID"].ToString());
        }
        if (DataValidateManager.ValidateIsNull(ViewState["UserGroupID"]) == false)
        {
            htInputParameter.Add("UserGroupID", ViewState["UserGroupID"].ToString());
        }
        if (DataValidateManager.ValidateIsNull(ViewState["UserGroupName"]) == false)
        {
            htInputParameter.Add("UserGroupName", ViewState["UserGroupName"].ToString());
        }
        if (DataValidateManager.ValidateIsNull(ViewState["UserGroupContent"]) == false)
        {
            htInputParameter.Add("UserGroupContent", ViewState["UserGroupContent"].ToString());
        }
        if (DataValidateManager.ValidateIsNull(ViewState["UserGroupRemark"]) == false)
        {
            htInputParameter.Add("UserGroupRemark", ViewState["UserGroupRemark"].ToString());
        }

        if (ValidateQueryInputParameter())
        {
            UserGroupLibrary instanceUserGroupLibrary = new UserGroupLibrary();
            htOutputParameter       = instanceUserGroupLibrary.SelectRecordInfo(htInputParameter);
            dsRecordInfo            = (DataSet)htOutputParameter[ConstantsManager.QUERY_DATASET_NAME];
            intRecordCount          = (int)htOutputParameter[ConstantsManager.RECORD_COUNT];
            gvRecordList.DataSource = dsRecordInfo;
            gvRecordList.DataBind();
        }
        else
        {
            //对错误消息进行处理
            MessageContent = strMessageInfo;
        }
    }
    private void InitialPage()
    {
        //定义权限类型名临时变量
        string strPurviewTypeName;
        int    intCount;
        int    i;

        htInputParameter = new Hashtable();
        dsRecordInfo     = new DataSet();
        htInputParameter.Add(ConstantsManager.QUERY_DATASET_NAME, dsRecordInfo);
        htInputParameter.Add(ConstantsManager.MESSAGE_ID, "");
        htInputParameter.Add("UserGroupID", lblUserGroupID.Text);

        UserGroupLibrary instanceUserGroupLibrary = new UserGroupLibrary();

        htOutputParameter = instanceUserGroupLibrary.SelectRecordInfo(htInputParameter);
        dsRecordInfo      = (DataSet)htOutputParameter[ConstantsManager.QUERY_DATASET_NAME];

        lblUserGroupName.Text    = dsRecordInfo.Tables[0].Rows[0]["UserGroupName"].ToString();
        lblUserGroupID.Text      = dsRecordInfo.Tables[0].Rows[0]["UserGroupID"].ToString();
        lblUserGroupContent.Text = dsRecordInfo.Tables[0].Rows[0]["UserGroupContent"].ToString();

        htInputParameter = new Hashtable();
        dsRecordInfo     = new DataSet();
        htInputParameter.Add(ConstantsManager.QUERY_DATASET_NAME, dsRecordInfo);
        htInputParameter.Add(ConstantsManager.MESSAGE_ID, "");
        htInputParameter.Add("UserGroupID", lblUserGroupID.Text);
        htInputParameter.Add("PurviewPRI", int.Parse(rblPurviewPRI.SelectedValue));
        UserGroupPurviewLibrary instanceUserGroupPurviewLibrary = new UserGroupPurviewLibrary();

        htOutputParameter  = instanceUserGroupPurviewLibrary.GetUserGroupPurviewInfo(htInputParameter);
        dsRecordInfo       = (DataSet)htOutputParameter[ConstantsManager.QUERY_DATASET_NAME];
        strPurviewTypeName = "";
        for (i = 0; i < dsRecordInfo.Tables[0].Rows.Count; i++)
        {
            TableRow trTemp = new TableRow();
            intCount = i;
            for (int j = i; j < intCount + 4 && j < dsRecordInfo.Tables[0].Rows.Count; j++)
            {
                i = j;
                if (dsRecordInfo.Tables[0].Rows[i]["PurviewTypeName"].ToString() != strPurviewTypeName)
                {
                    TableRow  trTempTitle = new TableRow();
                    TableCell tcTempTitle = new TableCell();
                    Label     lblTemp     = new Label();
                    lblTemp.Text = dsRecordInfo.Tables[0].Rows[i]["PurviewTypeName"].ToString();
                    tcTempTitle.Controls.Add(lblTemp);
                    tcTempTitle.ColumnSpan = 4;
                    tcTempTitle.CssClass   = "xingmu";
                    trTempTitle.Cells.Add(tcTempTitle);
                    tbPurviewInfo.Rows.Add(trTemp);
                    tbPurviewInfo.Rows.Add(trTempTitle);
                    strPurviewTypeName = dsRecordInfo.Tables[0].Rows[i]["PurviewTypeName"].ToString();
                    trTemp             = new TableRow();
                }
                TableCell tcTemp  = new TableCell();
                CheckBox  chkTemp = new CheckBox();
                chkTemp.ID   = dsRecordInfo.Tables[0].Rows[i]["PurviewID"].ToString();
                chkTemp.Text = dsRecordInfo.Tables[0].Rows[i]["PurviewName"].ToString();
                if (DataValidateManager.ValidateIsNull(dsRecordInfo.Tables[0].Rows[i]["IsPageMenu"]) == false)
                {
                    if ((bool)dsRecordInfo.Tables[0].Rows[i]["IsPageMenu"] == true)
                    {
                        chkTemp.Text = chkTemp.Text + "(菜单项)";
                    }
                }
                chkTemp.InputAttributes.Add("value", dsRecordInfo.Tables[0].Rows[i]["PurviewID"].ToString());
                if (dsRecordInfo.Tables[0].Rows[i]["UserGroupID"] == DBNull.Value ||
                    dsRecordInfo.Tables[0].Rows[i]["UserGroupID"].ToString() == "" ||
                    dsRecordInfo.Tables[0].Rows[i]["UserGroupID"].ToString() == string.Empty)
                {
                    chkTemp.Checked = false;
                }
                else if (dsRecordInfo.Tables[0].Rows[i]["UserGroupID"] != DBNull.Value &&
                         dsRecordInfo.Tables[0].Rows[i]["UserGroupID"].ToString() != "" &&
                         dsRecordInfo.Tables[0].Rows[i]["UserGroupID"].ToString() != string.Empty)
                {
                    chkTemp.Checked = true;
                }
                tcTemp.Controls.Add(chkTemp);
                tcTemp.CssClass = "hback";
                trTemp.Cells.Add(tcTemp);
            }
            tbPurviewInfo.Rows.Add(trTemp);
        }
    }