Beispiel #1
0
        public Ders[] GetDersler()
        {
            Ders[]   dersler = null;
            string[] lines   = File.ReadAllLines(_path);
            Ders     ders;

            dersler = new Ders[lines.Length];
            int i = 0;

            foreach (var line in lines)
            {
                ders = new Ders()
                {
                    Id         = Convert.ToInt32(line.Split(';')[0]),
                    Adi        = line.Split(';')[1],
                    Kategorisi = (KategoriEnum)Convert.ToInt32(line.Split(';')[2]),
                    Icerigi    = line.Split(';')[3],
                    Kredi      = Convert.ToInt16(line.Split(';')[4])
                };
                dersler[i] = ders;
                i++;
            }
            return(dersler);
        }
Beispiel #2
0
 public void Add(Ders ders)
 {
     _operations.AddDers(ders);
 }