示例#1
0
        public void PrintBadgesToFile(string directoryPath, bool forceRecompute, bool printFreeSpots)
        {
            if (this.Attendees == null || !this.Attendees.Any() || forceRecompute)
            {
                GenerateAllBadges();
            }

            string        extFile          = Convertors.EventTypeToString(this.CurrentEvent.Type, true);
            List <string> temp             = GetStringListOfAssignedAttendees();
            string        outputBadgesFile = string.Format("{0}\\Donnees_Badges.csv", directoryPath);

            File.WriteAllLines(outputBadgesFile, temp.ToArray(), Encoding.Unicode);

            if (!printFreeSpots)
            {
                return;
            }

            temp = GetStringListOfEmptySections();
            string freePlacesFile = string.Format("{0}\\Liste_Sieges_Hall_Disponibles.csv", directoryPath);

            File.WriteAllLines(freePlacesFile, temp.ToArray(), Encoding.Unicode);

            temp           = GetStringListOfEmptyBeds();
            freePlacesFile = string.Format("{0}\\Liste_Lits_Dortoir_Disponibles.csv", directoryPath);
            File.WriteAllLines(freePlacesFile, temp.ToArray(), Encoding.Unicode);

            temp           = GetStringListOfEmptyTables();
            freePlacesFile = string.Format("{0}\\Liste_Tables_Refectoire_Disponibles.csv", directoryPath);
            File.WriteAllLines(freePlacesFile, temp.ToArray(), Encoding.Unicode);
        }