Esempio n. 1
0
 public List<ReadedDepartment> ReadFile(string fileName)
 {
     int id = 1;
     StreamReader _sr = new StreamReader(fileName, Encoding.Default);
     while (!_sr.EndOfStream)
     {
         //var scheduleModule = new ScheduleDbModule("scheduleDb");
         string line = _sr.ReadLine();
         if (line != null)
         {
             string fullName = line.Substring(0, line.Length).Trim();
             var chairData = new ReadedDepartment();
             if (fullName != null)
             {
                 chairData.Name = fullName;
                 //chairData.Id = id;
                 ++id;
             }
             ChairList.Add(chairData);
         }
     }
     return ChairList;
 }
Esempio n. 2
0
        public List <ReadedDepartment> ReadFile(string fileName)
        {
            int          id  = 1;
            StreamReader _sr = new StreamReader(fileName, Encoding.Default);

            while (!_sr.EndOfStream)
            {
                //var scheduleModule = new ScheduleDbModule("scheduleDb");
                string line = _sr.ReadLine();
                if (line != null)
                {
                    string fullName  = line.Substring(0, line.Length).Trim();
                    var    chairData = new ReadedDepartment();
                    if (fullName != null)
                    {
                        chairData.Name = fullName;
                        //chairData.Id = id;
                        ++id;
                    }
                    ChairList.Add(chairData);
                }
            }
            return(ChairList);
        }