Ejemplo n.º 1
0
 public void AddCrewMember(Cabinecrew crew)
 {
     this.Crew.Add(crew);
 }
Ejemplo n.º 2
0
        private void ReadCrew()
        {
            cabincrew.Clear();
            StreamReader file = new StreamReader(path + "Databases\\Crew.txt");
            string lijn;

            while ((lijn = file.ReadLine()) != null)
            {
                string[] apart = lijn.Split('|');
                Gender gender;
                switch (apart[3])
                {
                    case "Male":
                        gender = Gender.Male;
                        break;
                    case "Female":
                        gender = Gender.Female;
                        break;

                    default:
                        gender = Gender.Unknown;
                        break;
                }
                Cabinecrew crew = new Cabinecrew(DateTime.Parse(apart[0]), apart[1], apart[2], gender);

                cabincrew.Add(crew);
            }
            file.Close();
        }