private void button4_Click(object sender, EventArgs e) { DataRow rowtp = DTSFTP.Rows[0]; if (textBox5.Text == string.Empty) { HOST = Convert.ToString(rowtp["HOST"]); } else { HOST = textBox5.Text; } if (textBox6.Text == string.Empty) { USER = Convert.ToString(rowtp["USER"]); } else { USER = textBox6.Text; } if (textBox7.Text == string.Empty) { SFTPKEY = Encripter.Encriptar(Convert.ToString(rowtp["SFTPKEY"])); } else { SFTPKEY = Encripter.Encriptar(textBox7.Text); } if (textBox8.Text == string.Empty) { PUERTO = Convert.ToString(rowtp["PUERTO"]); } else { PUERTO = textBox8.Text; } if (checkBox1.Checked) { AUTOMATICO = "YES"; } else { AUTOMATICO = "NO"; } XMLRW.write("SFTP", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", HOST, USER, SFTPKEY, PUERTO, AUTOMATICO); }
private void button2_Click(object sender, EventArgs e) { DataRow row = DT.Rows[0]; if (comboBox1.Text == "192.168.1.25 [EXACTUS]") { SSQLserver = textBox1.Text; SWeb = Convert.ToString(row["SERVIDORWEB"]); SDMdatabase = Convert.ToString(row["DBSQLDM"]); SDBExactus = textBox4.Text; SDBWeb = Convert.ToString(row["DBWEB"]); SSQLogin = textBox2.Text; SMyqlogin = Convert.ToString(row["LOGINWEB"]); SSqlID = Encripter.Encriptar(textBox3.Text); SMsqlID = Convert.ToString(row["KEYIDWEB"]); SSQLserverseg = Convert.ToString(row["SERVIDORSQLSEG"]); SDBSeguridad = Convert.ToString(row["DBSQLSG"]); SSQLoginsg = Convert.ToString(row["LOGINSG"]); SSqlIDsg = Convert.ToString(row["KEYIDSG"]); PGSQLserver = Convert.ToString(row["SERVIDORPGSQL"]); pgdb = Convert.ToString(row["DBPG"]); pglogin = Convert.ToString(row["LOGINPG"]); pgID = Convert.ToString(row["KEYIDPG"]); XMLRW.write("CONFIGURACION", SSQLserver, SWeb, SSQLserverseg, PGSQLserver, SDMdatabase, SDBExactus, SDBSeguridad, pgdb, SDBWeb, SSQLogin, SSQLoginsg, SMyqlogin, pglogin, SSqlID, SSqlIDsg, SMsqlID, pgID, "", "", "", "", ""); } else if (comboBox1.Text == "mysql.dismonline") { SSQLserver = Convert.ToString(row["SERVIDORSQL"]); SWeb = textBox1.Text; SDMdatabase = Convert.ToString(row["DBSQLDM"]); SDBExactus = Convert.ToString(row["DBSQLEX"]); SDBWeb = textBox4.Text; SSQLogin = Convert.ToString(row["LOGIN"]); SMyqlogin = textBox2.Text; SSqlID = Convert.ToString(row["KEYID"]); SMsqlID = Encripter.Encriptar(textBox3.Text); SSQLserverseg = Convert.ToString(row["SERVIDORSQLSEG"]); SDBSeguridad = Convert.ToString(row["DBSQLSG"]); SSQLoginsg = Convert.ToString(row["LOGINSG"]); SSqlIDsg = Convert.ToString(row["KEYIDSG"]); PGSQLserver = Convert.ToString(row["SERVIDORPGSQL"]); pgdb = Convert.ToString(row["DBPG"]); pglogin = Convert.ToString(row["LOGINPG"]); pgID = Convert.ToString(row["KEYIDPG"]); XMLRW.write("CONFIGURACION", SSQLserver, SWeb, SSQLserverseg, PGSQLserver, SDMdatabase, SDBExactus, SDBSeguridad, pgdb, SDBWeb, SSQLogin, SSQLoginsg, SMyqlogin, pglogin, SSqlID, SSqlIDsg, SMsqlID, pgID, "", "", "", "", ""); } else if (comboBox1.Text == "192.168.1.25 [DM]") { SSQLserver = textBox1.Text; SWeb = Convert.ToString(row["SERVIDORWEB"]); SDMdatabase = textBox4.Text; SDBExactus = Convert.ToString(row["DBSQLEX"]); SDBWeb = Convert.ToString(row["DBWEB"]); SSQLogin = textBox2.Text; SMyqlogin = Convert.ToString(row["LOGINWEB"]); SSqlID = Encripter.Encriptar(textBox3.Text); SMsqlID = Convert.ToString(row["KEYIDWEB"]); SSQLserverseg = Convert.ToString(row["SERVIDORSQLSEG"]); SDBSeguridad = Convert.ToString(row["DBSQLSG"]); SSQLoginsg = Convert.ToString(row["LOGINSG"]); SSqlIDsg = Convert.ToString(row["KEYIDSG"]); PGSQLserver = Convert.ToString(row["SERVIDORPGSQL"]); pgdb = Convert.ToString(row["DBPG"]); pglogin = Convert.ToString(row["LOGINPG"]); pgID = Convert.ToString(row["KEYIDPG"]); XMLRW.write("CONFIGURACION", SSQLserver, SWeb, SSQLserverseg, PGSQLserver, SDMdatabase, SDBExactus, SDBSeguridad, pgdb, SDBWeb, SSQLogin, SSQLoginsg, SMyqlogin, pglogin, SSqlID, SSqlIDsg, SMsqlID, pgID, "", "", "", "", ""); } else if (comboBox1.Text == "192.168.1.11 [ACCESSCONTROL]") { SSQLserver = Convert.ToString(row["SERVIDORSQL"]); SSQLserverseg = textBox1.Text; SWeb = Convert.ToString(row["SERVIDORWEB"]); SDMdatabase = Convert.ToString(row["DBSQLDM"]); SDBSeguridad = textBox4.Text; SDBExactus = Convert.ToString(row["DBSQLEX"]); SDBWeb = Convert.ToString(row["DBWEB"]); SSQLoginsg = textBox2.Text; SSQLogin = Convert.ToString(row["LOGIN"]); SMyqlogin = Convert.ToString(row["LOGINWEB"]); SSqlID = Convert.ToString(row["KEYID"]); SSqlIDsg = Encripter.Encriptar(textBox3.Text); SMsqlID = Convert.ToString(row["KEYIDWEB"]); PGSQLserver = Convert.ToString(row["SERVIDORPGSQL"]); pgdb = Convert.ToString(row["DBPG"]); pglogin = Convert.ToString(row["LOGINPG"]); pgID = Convert.ToString(row["KEYIDPG"]); XMLRW.write("CONFIGURACION", SSQLserver, SWeb, SSQLserverseg, PGSQLserver, SDMdatabase, SDBExactus, SDBSeguridad, pgdb, SDBWeb, SSQLogin, SSQLoginsg, SMyqlogin, pglogin, SSqlID, SSqlIDsg, SMsqlID, pgID, "", "", "", "", ""); } else if (comboBox1.Text == "18.216.38.163 [ODOO]") { SSQLserver = Convert.ToString(row["SERVIDORSQL"]); SWeb = Convert.ToString(row["SERVIDORWEB"]); SDMdatabase = Convert.ToString(row["DBSQLDM"]); SDBExactus = Convert.ToString(row["DBSQLEX"]); SDBWeb = Convert.ToString(row["DBWEB"]); SSQLogin = Convert.ToString(row["LOGIN"]); SMyqlogin = Convert.ToString(row["LOGINWEB"]); SSqlID = Convert.ToString(row["KEYID"]); SMsqlID = Convert.ToString(row["KEYIDWEB"]); SSQLserverseg = Convert.ToString(row["SERVIDORSQLSEG"]); SDBSeguridad = Convert.ToString(row["DBSQLSG"]); SSQLoginsg = Convert.ToString(row["LOGINSG"]); SSqlIDsg = Convert.ToString(row["KEYIDSG"]); PGSQLserver = textBox1.Text; pgdb = textBox4.Text; pglogin = textBox2.Text; pgID = Encripter.Encriptar(textBox3.Text); XMLRW.write("CONFIGURACION", SSQLserver, SWeb, SSQLserverseg, PGSQLserver, SDMdatabase, SDBExactus, SDBSeguridad, pgdb, SDBWeb, SSQLogin, SSQLoginsg, SMyqlogin, pglogin, SSqlID, SSqlIDsg, SMsqlID, pgID, "", "", "", "", ""); } }