Ejemplo n.º 1
0
        /// <summary>
        /// Citeste si incarca lectiile
        /// </summary>
        /// <param name="filePath">Locatia fisierului cu Lectii</param>
        /// <returns></returns>
        public bool ParseFile(string filePath)
        {
            _filePath = filePath;
            LectiiHolder = new LectiiHolder();

            try
            {
                var xmls = new XmlSerializer(typeof(LectiiHolder));
                var streamReader = new System.IO.StreamReader(filePath,false);
                LectiiHolder = (LectiiHolder)xmls.Deserialize(streamReader);

                return true;
            }
            catch (Exception e)
            {
                ExceptionsHandler.Instance.AddException(e,Messages.ERROR_LOAD_LECTII);
                return false;
            }
        }
Ejemplo n.º 2
0
 private LectiiHandler()
 {
     LectiiHolder = new LectiiHolder();
 }