diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs index e50e5cb6e..04ca2cdeb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs @@ -21,6 +21,16 @@ namespace Tango.PPC.DataSynchronizer.CLI public class DataSynchronizer { + private const String REMOTE_ADDRESS = "twine.database.windows.net"; + private const String REMOTE_CATALOG = "Tango_DEV"; + private const String REMOTE_USER_NAME = "Roy"; + private const String REMOTE_PASSWORD = "Aa123456"; + + private const String LOCAL_ADDRESS = "localhost\\SQLPPC"; + private const String LOCAL_CATALOG = "Tango"; + + private const String MACHINE_SERIAL_NUMBER = "LENA_TABLET"; + private Core.DataSource source; private Core.DataSource target; private String machineGuid; @@ -33,19 +43,19 @@ namespace Tango.PPC.DataSynchronizer.CLI source = new Core.DataSource(); source.IntegratedSecurity = false; - source.Address = "twine.database.windows.net"; - source.Catalog = "Tango_DEV"; - source.UserName = "Roy"; - source.Password = "Aa123456"; + source.Address = REMOTE_ADDRESS; + source.Catalog = REMOTE_CATALOG; + source.UserName = REMOTE_USER_NAME; + source.Password = REMOTE_PASSWORD; using (ObservablesContext db = ObservablesContext.CreateDefault(source)) { - machineGuid = db.Machines.Where(x => x.SerialNumber == "LENA_TABLET").Take(1).Select(x => x.Guid).First(); + machineGuid = db.Machines.Where(x => x.SerialNumber == MACHINE_SERIAL_NUMBER).Take(1).Select(x => x.Guid).First(); } target = new Core.DataSource(); - target.Address = "localhost\\SQLPPC"; - target.Catalog = "Tango"; + target.Address = LOCAL_ADDRESS; + target.Catalog = LOCAL_CATALOG; OverrideData(); UpdateMachine(); |
