Merge branch 'feature/Osai_ToolTable' into develop
# Conflicts: # Libs/CMS_CORE_Library.dll # Step.Core/ThreadsFunctions.cs # Step.Core/ThreadsHandler.cs # Step.Database/DatabaseContext.cs # Step.Database/Migrations/201806220920193_InitMigration.Designer.cs # Step.Database/Migrations/201806220920193_InitMigration.cs # Step.Database/Migrations/201807120908403_InitMigration.Designer.cs # Step.Database/Migrations/201807120908403_InitMigration.cs # Step.Database/Migrations/201807120908403_InitMigration.resx # Step.Database/Migrations/201807251330036_InitMigration.Designer.cs # Step.Database/Migrations/201807251330036_InitMigration.cs # Step.Database/Step.Database.csproj # Step.Model/Constants.cs # Step.NC/NcHandler.cs # Step/Listeners/ListenersHandler.cs # Step/Step.csproj
This commit is contained in:
@@ -30,8 +30,14 @@ namespace Step.Database
|
||||
public DbSet<MaintenanceFileModel> MaintenanceFiles { get; set; }
|
||||
public DbSet<FavoriteUserSoftkeyModel> FavoriteUserSoftkeys { get; set; }
|
||||
|
||||
public DbSet<DbNcFamilyModel> Families { get; set; }
|
||||
public DbSet<DbNcShankModel> Shanks { get; set; }
|
||||
public DbSet<DbNcToolModel> Tools { get; set; }
|
||||
public DbSet<DbNcMagazinePositionModel> MagazinePositions { get; set; }
|
||||
|
||||
// Create migration string
|
||||
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME +";Uid="+ DATABASE_USER +";Pwd="+ DATABASE_PWD +";";
|
||||
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";";
|
||||
|
||||
// public static string CONNECTION_STRING = "Server = " + ServerStartupConfig.DatabaseAddress + "; Database=" + DATABASE_NAME +";Uid="+ DATABASE_USER +";Pwd="+ DATABASE_PWD +";";
|
||||
|
||||
public DatabaseContext()
|
||||
@@ -77,25 +83,19 @@ namespace Step.Database
|
||||
AllFunctionalityDisabled = functionsAccess.FindAllFunctionsAndDisableAll();
|
||||
}
|
||||
}
|
||||
catch (MySql.Data.MySqlClient.MySqlException ex)
|
||||
{
|
||||
if (ex.Number == 0)
|
||||
{
|
||||
//dbContext.Database.Initialize(true);
|
||||
}
|
||||
else if (ex.Number == 1042) // Can't find MySQLServer
|
||||
{
|
||||
Manage(ERROR_LEVEL.FATAL, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Manage(ERROR_LEVEL.ERROR, ex);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Manage(ERROR_LEVEL.FATAL, ex);
|
||||
}
|
||||
|
||||
|
||||
//catch (MySql.Data.MySqlClient.MySqlException ex)
|
||||
//{
|
||||
// if (ex.Number == 1042) // Can't find MySQLServer
|
||||
// Manage(ERROR_LEVEL.FATAL, ex);
|
||||
// else
|
||||
// Manage(ERROR_LEVEL.ERROR, ex);
|
||||
//}
|
||||
}
|
||||
|
||||
public static void FindOrCreateMachineUniqueId()
|
||||
|
||||
Reference in New Issue
Block a user