Exemple #1
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idMall", "serverName", "mallName" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Mall");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Mall", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteMall");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveMall");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateMall");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Mall", "idMall");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Mall", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Mall", "idMall", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #2
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idCampaign", "description", "name", "startDate", "stopDate", "idUser" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string), typeof(System.DateTime), typeof(System.DateTime), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Campaign");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Campaign", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteCampaign");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveCampaign");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateCampaign");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Campaign", "idCampaign");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Campaign", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Campaign", "idCampaign", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #3
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idConnectionPoint", "connectionType", "xCoordinateRelativeToParent", "yCoordinateRelativeToParent", "idParentComponent", "idComponent", "idConnectionWidget" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(int), typeof(double), typeof(double), typeof(int), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("ConnectionPoint");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("ConnectionPoint", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteConnectionPoint");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveConnectionPoint");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateConnectionPoint");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("ConnectionPoint", "idConnectionPoint");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("ConnectionPoint", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("ConnectionPoint", "idConnectionPoint", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #4
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idRegisterAssociation", "idRegister", "idTable" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("RegisterAssociation");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("RegisterAssociation", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteRegisterAssociation");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveRegisterAssociation");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateRegisterAssociation");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("RegisterAssociation", "idRegisterAssociation");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("RegisterAssociation", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("RegisterAssociation", "idRegisterAssociation", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #5
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idUserActionClientData", "actionType", "start", "stop", "idTable", "idRegister", "idComponent", "idService" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(int), typeof(System.DateTime), typeof(System.DateTime), typeof(int), typeof(int), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("UserActionClientData");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("UserActionClientData", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteUserActionClientData");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveUserActionClientData");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateUserActionClientData");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("UserActionClientData", "idUserActionClientData");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("UserActionClientData", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("UserActionClientData", "idUserActionClientData", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idDeviceProfile", "deviceType", "deviceModel", "macAddress", "windowsMobileVersion", "idCustomer" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string), typeof(string), typeof(string), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("DeviceProfile");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("DeviceProfile", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteDeviceProfile");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveDeviceProfile");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateDeviceProfile");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("DeviceProfile", "idDeviceProfile");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("DeviceProfile", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("DeviceProfile", "idDeviceProfile", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idStore", "name", "telephoneNumber", "internalPhoneNumber", "contactName", "ownerName", "email", "webAddress", "localNumber", "idMall", "idDataModel" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Store");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Store", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteStore");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveStore");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateStore");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Store", "idStore");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Store", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Store", "idStore", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idPermission", "allowRead", "allowUpdate", "allowNew", "allowDelete", "businessClassName", "idGroup" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(bool), typeof(bool), typeof(bool), typeof(bool), typeof(string), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Permission");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Permission", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeletePermission");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SavePermission");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdatePermission");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Permission", "idPermission");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Permission", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Permission", "idPermission", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idTable", "name", "isStorage", "idDataModel", "idComponent" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(bool), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Table");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Table", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteTable");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveTable");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateTable");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Table", "idTable");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Table", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Table", "idTable", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #10
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idUser", "userName", "password", "name", "surname", "phoneNumber", "isUserActive", "charge", "idStore" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(bool), typeof(string), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("User");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("User", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteUser");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveUser");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateUser");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("User", "idUser");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("User", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("User", "idUser", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idGroup", "name", "description", "isGroupActive" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(string), typeof(string), typeof(bool) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Group");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Group", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteGroup");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveGroup");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateGroup");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Group", "idGroup");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Group", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Group", "idGroup", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
Exemple #12
0
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idPreference", "active", "level", "idCustomer", "idCategory" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(bool), typeof(double), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("Preference");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("Preference", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeletePreference");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SavePreference");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdatePreference");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("Preference", "idPreference");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("Preference", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("Preference", "idPreference", fieldsName, fieldsType);
            }

            dbChecked = true;
        }
        /// <summary>
        /// Function to check and create table and stored procedures for this class.
        /// </summary>
        private static void DbChecked()
        {
            if (dbChecked)
            {
                return;
            }
            string[] fieldsName = new string[] { "idConnectionWidget", "idTarget", "idSource", "idCustomerServiceData" };
            Type[]   fieldsType = new Type[] { typeof(int), typeof(int), typeof(int), typeof(int) };

            bool existsTable = DataAccessConnection.DBCheckedTable("ConnectionWidget");

            if (!existsTable)
            {
                DataAccessConnection.CreateTable("ConnectionWidget", fieldsName, true, fieldsType);
            }
            bool existsProcedureDelete = DataAccessConnection.DBCheckedStoredProcedure("DeleteConnectionWidget");
            bool existsProcedureSave   = DataAccessConnection.DBCheckedStoredProcedure("SaveConnectionWidget");
            bool existsProcedureUpdate = DataAccessConnection.DBCheckedStoredProcedure("UpdateConnectionWidget");

            if (!existsProcedureDelete)
            {
                DataAccessConnection.CreateDeleteStoredProcedure("ConnectionWidget", "idConnectionWidget");
            }

            if (!existsProcedureSave)
            {
                DataAccessConnection.CreateSaveStoredProcedure("ConnectionWidget", fieldsName, fieldsType);
            }

            if (!existsProcedureUpdate)
            {
                DataAccessConnection.CreateUpdateStoredProcedure("ConnectionWidget", "idConnectionWidget", fieldsName, fieldsType);
            }

            dbChecked = true;
        }