Esempio n. 1
0
 // language constructor
 /// <summary>
 /// Constructor for language based XMLreading
 /// </summary>
 /// <param name="target"></param>
 /// <param name="reader"></param>
 /// <param name="diagnostic"></param>
 public XmlDataReader(Enum target, Reader reader,  bool diagnostic = false )
 {
     //select what to run based on enum cast.
                 DiagXML = diagnostic; //default diagnostic to false.
                 readerXML = reader;
                 switch ((ConfigType)target)
                     {
                     case ConfigType.Students:
                     ReadConfig(ConfigType.Students);
                         break;
                     case ConfigType.Teachers:
                     ReadConfig(ConfigType.Teachers);
                         break;
                     /*
                     case ConfigType.Nor:
                         ReadLanguage(ConfigType.Nor);
                         break;
                     case ConfigType.Fin:
                         ReadLanguage(ConfigType.Fin);
                         break;
                     case ConfigType.Eng:
                         ReadLanguage(ConfigType.Eng);
                         break;
                     case ConfigType.Rus:
                         ReadLanguage(ConfigType.Rus);
                         break;
                     case ConfigType.Swe:
                         ReadLanguage(ConfigType.Swe);
                         break;
                     */
                     }
 }
Esempio n. 2
0
 /// <summary>
 /// Returns the data, and if you have not created it yet, it will.
 /// </summary>
 /// <returns></returns>
 public string[] GetData()
 {
     if (_result != null)
                 {
                     return _result;
                 }
             var backup = new Reader();
             return GenerateData(backup.GetBackup(),backup);
 }
Esempio n. 3
0
 /// <summary>
 /// Generate data based on RFID 
 /// </summary>
 /// <param name="input">This is the RFID!</param>
 /// <returns></returns>
 public string[] GenerateData(string input, Reader reader, bool diag = false)
 {
     LogThings.Report(@"DatabaseManager.cs", @"GenerateData, Begin");
             _reader = reader;
             _diagnostic = diag;
             _rfid = input; // store RFID
             LogThings.Report(@"DatabaseManager.cs", @"GenerateData, Vars set, calling DataCon with RFID passed as string");
             DataCon(input);
             LogThings.Report(@"DatabaseManager.cs", @"GenerateData, Calling ConnectToDatabase");
             ConnectToDataBase();
             LogThings.Report(@"DatabaseManager.cs", @"GenerateData, Returning Result string array");
             LogThings.Report(@"DatabaseManager.cs", @"GenerateData, END");
             //_result[7] = SanitizeName(_result[7]);
             return _result; // this contains most recent result
 }