diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-04-19 12:01:58 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-04-19 12:01:58 +0300 |
| commit | 73eba10804834bf1ff1e5c9834c33814dd0a6d61 (patch) | |
| tree | 6c4ef98b0d626726cfa172d63071bba7c66f5354 /Software/Visual_Studio/PPC/Tango.PPC.DataSynchronizer.CLI/Program.cs | |
| parent | 15067dcfb8ca4c74f75f7b54e3ff272e389e8d1a (diff) | |
| download | Tango-73eba10804834bf1ff1e5c9834c33814dd0a6d61.tar.gz Tango-73eba10804834bf1ff1e5c9834c33814dd0a6d61.zip | |
Data Synchronizer
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(); |
