コード例 #1
0
        private void ExportToCSV()
        {
            AssetFinder        finder    = GetFinderFromForm();
            EntityList <Asset> assetList = Asset.FindMany(finder);

            var fileGen = new EntityListCsvExporter(assetList);

            fileGen.AddFieldMapping("PopularityRank", "Rank");
            fileGen.AddFieldMapping("AssetId", "Ref");
            fileGen.AddFieldMapping("AssetTypeName", "Type");
            fileGen.AddFieldMapping("UploadedByUserName", "Upload User");
            fileGen.AddFieldMapping("Title", "Title");

            var exporter = new Exporter("AuditAssetHistory.csv", fileGen);

            exporter.Export();
        }
コード例 #2
0
        private void ExportToCSV()
        {
            AuditUserHistoryFinder        finder           = GetFinderFromForm();
            EntityList <AuditUserHistory> auditUserHistory = AuditUserHistory.FindMany(finder);

            var fileGen = new EntityListCsvExporter(auditUserHistory);

            fileGen.AddFieldMapping("UserEmail", "User");
            fileGen.AddFieldMapping("Description", "Event");
            fileGen.AddFieldMapping("IpAddress", "IpAddress");
            fileGen.AddFieldMapping("Date", "Date & Time");
            fileGen.AddFieldMapping("Notes", "Notes");

            var exporter = new Exporter("AuditUserHistory.csv", fileGen);

            exporter.Export();
        }
コード例 #3
0
        private void ExportToCSV()
        {
            var          finder    = GetFinderFromForm();
            List <Asset> assetList = Asset.FindMany(finder);

            var fileGen = new EntityListCsvExporter(assetList);

            foreach (var col in REPORT_COLUMNS)
            {
                fileGen.AddFieldMapping(col, GeneralUtils.SplitIntoSentence(col));
            }

            var exporter = new Exporter("AssetList.csv", fileGen);

            exporter.Export();
        }