예제 #1
0
        static void Load(string filename)
        {
            _angajati = new Angajati <Persoana>();
            StreamReader dataLoad = new StreamReader(filename);
            string       line     = dataLoad.ReadLine();

            while (line != null)
            {
                string[] date     = line.Split(' ');
                string   nume     = date[0];
                string   prenume  = date[1];
                string[] fullDate = date[2].Split('/');
                DateTime data     = new DateTime(int.Parse(fullDate[0]), int.Parse(fullDate[1]), int.Parse(fullDate[2]));

                Persoana angajati = new Persoana(nume, prenume, data);
                _angajati.Add(angajati);

                line = dataLoad.ReadLine();
            }
        }
예제 #2
0
 public void Add(Persoana angajat)
 {
     this.list.Add(angajat);
 }
예제 #3
0
 public void Remove(Persoana angajat)
 {
     this.list.Remove(angajat);
 }
예제 #4
0
 public Angajati(Persoana angajat)
 {
     this.list.Add(angajat);
 }