public void Search()
        {
            DataSet dsExtract = new DataSet();

            dsExtract = rptCanadaBonusExtractGet();

            Dictionary <string, string> fields = new Dictionary <string, string>(dsExtract.Tables[0].Rows.Count);

            foreach (DataColumn column in dsExtract.Tables[0].Columns)
            {
                fields.Add(column.ColumnName, column.ColumnName);
            }

            MicrosoftOfficeUtility.ExportData(dsExtract, monthText + " " + yearText + " Canada Extract", fields, OfficeExportType.Excel);
        }
Ejemplo n.º 2
0
        protected void Search()
        {
            FormToDataBind();

            if (Excel.Checked)
            {
                Dictionary <string, string> revenueEntryFields = new Dictionary <string, string>();
                revenueEntryFields.Add("BonusPlan", "Bonus Plan");
                revenueEntryFields.Add("CreateDT", "Create Date");
                revenueEntryFields.Add("EffectiveDT", "Effective Date");
                revenueEntryFields.Add("RevenueEntryType", "Revenue Entry Type");
                revenueEntryFields.Add("LedgerEntry", "Ledger Entry");

                MicrosoftOfficeUtility.ExportData(objRevenueEntryType.RevenueEntrySearch(), "Bonus Code Query Report", revenueEntryFields, OfficeExportType.Excel);
            }
            else
            {
                SearchResultGrid.Text = objRevenueEntryType.SearchResultGrid();
            }
        }