Ejemplo n.º 1
0
 public void ConfigTerminal(Replica replica, Table table, List<Insert> valuesToInsert)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrTerminalUser, replica.StrTerminalPassword, replica.StrTerminalIPAddress, replica.IntTerminalPort.ToString(), replica.StrTerminalDatabase);
     sqlDatabaseAccess.CreateReplicaLogs();
     sqlDatabaseAccess.createTable(table);
     sqlDatabaseAccess.ExecuteMultipleInsert(valuesToInsert);
     sqlDatabaseAccess.CreateTrigger(table);
 }
Ejemplo n.º 2
0
 public Table ConfigSource(Replica replica)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrSourceUser, replica.StrSourcePassword, replica.StrSourceIPAddress, replica.IntSourcePort.ToString(), replica.StrSourceDatabase);
     sqlDatabaseAccess.CreateReplicaLogs();
     //GEtTabe
     Table table = sqlDatabaseAccess.getTableStructure(replica.StrSourceDatabase, replica.StrSourceTable);
     //valuesToInsert = sqlDatabaseAccess.GetCurrentRows(table);
     sqlDatabaseAccess.CreateTrigger(table);
     return table;
 }
Ejemplo n.º 3
0
 public Boolean TableSyncTerminal(Replica replica, ReplicaLog replicaLog)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrTerminalUser, replica.StrTerminalPassword, replica.StrTerminalIPAddress, replica.IntTerminalPort.ToString(), replica.StrTerminalDatabase);
     return sqlDatabaseAccess.TableSync(replica.StrSourceTable, replicaLog.StrReplicaTransaction);
 }
Ejemplo n.º 4
0
 public Boolean SetReplicaTerminalLogSync(Replica replica, ReplicaLog oreplicaLog)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrTerminalUser, replica.StrTerminalPassword, replica.StrTerminalIPAddress, replica.IntTerminalPort.ToString(), replica.StrTerminalDatabase);
     return sqlDatabaseAccess.SetReplicaLogSync(oreplicaLog);
 }
Ejemplo n.º 5
0
 public Boolean SetReplicaSourceLogSync(Replica replica,ReplicaLog oreplicaLog)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrSourceUser, replica.StrSourcePassword, replica.StrSourceIPAddress, replica.IntSourcePort.ToString(), replica.StrSourceDatabase);
     return sqlDatabaseAccess.SetReplicaLogSync(oreplicaLog);
 }
Ejemplo n.º 6
0
 public List<Table> GetTables(string user, string password, string server, string port, string database)
 {
     SqlDatabaseDA sqlDatabaseDA = new SqlDatabaseDA(user, password, server, port, database);
     return sqlDatabaseDA.GetAllTables(database);
 }
Ejemplo n.º 7
0
 public List<ReplicaLog> GetReplicaLogsTerminalUnsynchronized(Replica replica)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrTerminalUser, replica.StrTerminalPassword, replica.StrTerminalIPAddress, replica.IntTerminalPort.ToString(), replica.StrTerminalDatabase);
     return sqlDatabaseAccess.GetReplicaLogsUnsynchronized(replica.StrSourceTable);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Sql Method to obtain Tables on DB
 /// </summary>
 /// <param name="user"></param>
 /// <param name="password"></param>
 /// <param name="server"></param>
 /// <param name="port"></param>
 /// <returns></returns>
 public List<Database> GetDatabases(string user, string password, string server, string port)
 {
     SqlDatabaseDA sqlDatabaseDA = new SqlDatabaseDA(user, password, server, port);
     return sqlDatabaseDA.GetAllDatabases();
 }
Ejemplo n.º 9
0
 public List<Insert> GetConfigValues(Replica replica, Table table)
 {
     SqlDatabaseDA sqlDatabaseAccess = new SqlDatabaseDA(replica.StrSourceUser, replica.StrSourcePassword, replica.StrSourceIPAddress, replica.IntSourcePort.ToString(), replica.StrSourceDatabase);
     return sqlDatabaseAccess.GetCurrentRows(table);
 }