Esempio n. 1
0
 //insert information in log
 public static bool LogEntry(string date, string door, string code, string tag)
 {
     try
     {
         InsertData.DataToLog(date, door, code, tag);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(false);
     }
 }
Esempio n. 2
0
        //Initiate and create database file if not existing already
        public static bool DatabaseFile()
        {
            FileInfo fi = new FileInfo(Settings.Database);

            if (!fi.Exists || fi.Length == 0)
            {
                SQLiteConnection.CreateFile(Settings.Database);
                Database.CreateTables();
                InsertData.BuildingAndTenantData();
                InsertData.EventLogData();
                return(true);
            }
            return(false);
        }