/// <summary>
        /// Creates the database. (MOVED from LayoutDatabase());
        /// </summary>
        public static BaseDatabase CreateDatabase()
        {
            BaseDatabase db = GetDatabaseType(LayoutDetails.Instance.YOM_DATABASE);            //new SqlLiteDatabase (LayoutDetails.Instance.YOM_DATABASE);

            db.CreateTableIfDoesNotExist(dbConstants.table_name,
                                         dbConstants.Columns,
                                         dbConstants.Types, String.Format("{0}", dbConstants.ID)
                                         );
            return(db);
        }
Esempio n. 2
0
        void CreateDatabase()
        {
            if (null == ThisDatabase)
            {
                throw new Exception("Database for EventTable has been set to null.");
            }

            // This part already done during Constructor BaseDatabase db = GetDatabaseType(LayoutDetails.Instance.YOM_DATABASE);//new SqlLiteDatabase (LayoutDetails.Instance.YOM_DATABASE);
            ThisDatabase.CreateTableIfDoesNotExist(table_name,
                                                   Columns,
                                                   Types, String.Format("{0}", ID)
                                                   );

            lg.Instance.Line("EventTable->CreateDatabase", ProblemType.MESSAGE, "Creating/verifying event table");
        }
Esempio n. 3
0
        private BaseDatabase CreateDatabase()
        {
            //BaseDatabase db = new SqlLiteDatabase (DatabaseName);
            BaseDatabase db = Layout.MasterOfLayouts.GetDatabaseType(DatabaseName);



            db.CreateTableIfDoesNotExist(TableName, new string[3]
            {
                columnID, columnKey, columnValue
            },
                                         new string[3] {
                "INTEGER",
                "TEXT",
                "TEXT"
            }, columnID
                                         );
            return(db);
        }
Esempio n. 4
0
        BaseDatabase CreateDatabase(string DatabaseName)
        {
            BaseDatabase db = GetBaseDatabase(DatabaseName);

            //	BaseDatabase db = new SqlLiteDatabase (DatabaseName);
            //BaseDatabase db = Layout.MasterOfLayouts.GetDatabaseType(DatabaseName);



            db.CreateTableIfDoesNotExist(TableName, new string[columnCount]
            {
                columnID, columnGUID, columnKeyModifier, columnKey
            },
                                         new string[columnCount] {
                "INTEGER",
                "TEXT", "TEXT", "TEXT"
            }, "id"
                                         );
            return(db);
        }
Esempio n. 5
0
        private BaseDatabase CreateAddInDatabase()
        {
            if (GetBaseDatabase == null)
            {
                throw new Exception("A valid base database delegated needs to be provided for this ADDIN to work.");
            }
            BaseDatabase db = GetBaseDatabase(DatabaseName);            // new SqlLiteDatabase (DatabaseName);



            db.CreateTableIfDoesNotExist(TableName, new string[2]
            {
                columnID, columnGUID
            },
                                         new string[2] {
                "INTEGER",
                "TEXT"
            }, "id"
                                         );
            return(db);
        }
Esempio n. 6
0
        private BaseDatabase CreateDatabase()
        {
            //BaseDatabase db = new SqlLiteDatabase (DatabaseName);
            BaseDatabase db = Layout.MasterOfLayouts.GetDatabaseType(DatabaseName);



            // stores generic stuff. Appearances will also be stored here, each as a row with columnKey = appearanceName and columnValue = the XML
            db.CreateTableIfDoesNotExist(TableName, new string[4]
            {
                columnID, columnKey, columnValue, columnType
            },
                                         new string[4] {
                "INTEGER",
                "TEXT",
                "TEXT",
                "INTEGER"
            }, "id"
                                         );
            return(db);
        }