Beispiel #1
0
        private static void DataLoad(string filepath)
        {
            staff = new MyList <Angajat>();
            StreamReader dataLoad = new StreamReader(filepath);
            string       line     = dataLoad.ReadLine();

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

                Angajat employee = new Angajat(lastName, firstName, date);
                staff.Add(employee);

                line = dataLoad.ReadLine();
            }
        }
Beispiel #2
0
 public void Remove(Angajat employee)
 {
     this.list.Remove(employee);
 }
Beispiel #3
0
 public void Add(Angajat employee)
 {
     this.list.Add(employee);
 }
Beispiel #4
0
 public MyList(Angajat employee)
 {
     this.list.Add(employee);
 }