void LoadDataBind()
    {
        string id = Request.QueryString["id"].ToString();//客户编号

        string CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        DataTable dt = LoveBus.PrintLove(CompanyCD, id);

        if (dt != null)
        {
            rd.Load(Server.MapPath(@"~/PrinttingModel/CustManager/LovePrint.rpt"));
            CrystalReportViewer1.LogOnInfo.Add(ReportUtil.GetTableLogOnInfo("officedba.CustLinkMan"));
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            //绑定数据
            rd.SetDataSource(dt);
            rd.Refresh();
            this.CrystalReportViewer1.ReportSource = rd;
            rd.SetParameterValue("Today", "制表人:" + userInfo.EmployeeName);
        }
    }
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            string orderString = hiddExpOrder.Value.Trim();                                                                            //排序
            string order       = "asc";                                                                                                //排序:降序
            string orderBy     = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "LoveDate"; //要排序的字段,如果为空,默认为"ID"

            if (orderString.EndsWith("_d"))
            {
                order = "desc";//排序:降序
            }
            string ord = " ORDER BY " + orderBy + " " + order;

            CustLoveModel CustLoveM = new CustLoveModel();
            string        CustID    = hiddCustID.Value;                           //客户ID
            CustLoveM.LoveType = Convert.ToInt32(ddlLoveType.SelectedItem.Value); //类型
            string LoveBegin   = txtLoveBegin.Value.Trim();                       //开始时间
            string LoveEnd     = txtLoveEnd.Value.Trim();                         //结束时间
            string CustLinkMan = txtCustLinkMan.Value.Trim();                     //客户联系人
            CustLoveM.Title     = txtTitle.Value.Trim();                          //主题
            CustLoveM.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            string CanUserID = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).EmployeeID.ToString();

            DataTable dt = LoveBus.ExportLoveInfo(CanUserID, CustID, CustLoveM, LoveBegin, LoveEnd, CustLinkMan, ord);

            OutputToExecl.ExportToTableFormat(this, dt,
                                              new string[] { "关怀编号", "关怀主题", "客户名称", "客户联系人", "关怀时间", "关怀类型", "执行人" },
                                              new string[] { "LoveNo", "Title", "CustNam", "LinkManName", "LoveDate", "LoveType", "EmployeeName" },
                                              "客户关怀列表");
        }
        catch
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Exp", "<script language=javascript>showPopup('../../../Images/Pic/Close.gif','../../../Images/Pic/note.gif','导出发生异常');</script>");
        }
    }