/// <summary>
    /// 根据面试模板ID,获取模板信息,并设置到页面显示
    /// </summary>
    /// <param name="templateID">模板ID</param>
    private void InitTemplateInfo(string templateID)
    {
        //设置编号可见
        divCodeNo.Attributes.Add("style", "display:block;");
        //自动生成编号的控件设置为不可见
        divCodeRule.Attributes.Add("style", "display:none;");

        //查询考试信息
        DataSet dsTemplateInfo = RectCheckTemplateBus.GetRectCheckTemplateInfoWithID(templateID);
        //获取考试基本信息
        DataTable dtBaseInfo = dsTemplateInfo.Tables[0];

        //基本信息存在时
        if (dtBaseInfo != null && dtBaseInfo.Rows.Count > 0)
        {
            #region 设置基本信息
            //模板编号
            divCodeNo.InnerHtml = GetSafeData.ValidateDataRow_String(dtBaseInfo.Rows[0], "TemplateNo");
            //主题
            txtTitle.Text = GetSafeData.ValidateDataRow_String(dtBaseInfo.Rows[0], "Title");
            //岗位
            ddlQuarter.SelectedValue = GetSafeData.ValidateDataRow_String(dtBaseInfo.Rows[0], "QuarterID");
            //考试状态
            txtRemark.Text = GetSafeData.ValidateDataRow_String(dtBaseInfo.Rows[0], "Remark");
            #endregion

            //设置要素信息
            InitElemInfo(dsTemplateInfo.Tables[1]);
        }
    }
    protected void btnImport_Click(object sender, System.Web.UI.ImageClickEventArgs e)
    {
        //从请求中获取排序列
        string orderString = hidOrderBy.Value.Trim();

        //排序:默认为升序
        string orderBy = "asc";
        //要排序的字段,如果为空,默认为"RectApplyNo"
        string orderByCol = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "TemplateNo";

        //降序时如果设置为降序
        if (orderString.EndsWith("_d"))
        {
            //排序:降序
            orderBy = "desc";
        }
        //从请求中获取当前页

        //int pageIndex = Convert.ToInt32(txtToPage.Value);
        ////从请求中获取每页显示记录数
        //int pageCount = Convert.ToInt32(txtShowPageCount.Value);
        ////跳过记录数
        //int skipRecord = (pageIndex - 1) * pageCount;


        RectCheckTemplateModel searchModel = new RectCheckTemplateModel();

        //设置查询条件
        //考核编号
        searchModel.TemplateNo = txtTemplateNo.Value.Trim();
        //主题
        searchModel.Title = txtTitle.Value.Trim();
        //岗位
        searchModel.QuarterID = Request.Form["ddlQuarter"].ToString();

        if (searchModel.Title != null)
        {
            int bbb = searchModel.Title.IndexOf('%');///过滤字符串
            if (bbb != -1)
            {
                searchModel.Title = searchModel.Title.Replace('%', ' ');
            }
        }
        string ord        = orderByCol + " " + orderBy;
        int    TotalCount = 0;
        //查询数据
        DataTable dtTemp = new DataTable();

        if (!string.IsNullOrEmpty(txtToPage.Value))
        {
            dtTemp = RectCheckTemplateBus.SearchTemplateCSInfo(searchModel, 1, 10000, ord, ref TotalCount);
        }
        string[,] ht =
        {
            { "模板编号", "TemplateNo"  },
            { "主题",   "Title"       },
            { "岗位",   "QuarterName" }
        };
        ExportExcel(dtTemp, ht, "", "面试评测模板列表");
    }