2026/07/01-01
This commit is contained in:
@@ -25,6 +25,7 @@ namespace bdGrupoSanchoToro.dbcontext
|
||||
List<Conexion> lc = new List<Conexion>();
|
||||
//lc.Add(new Conexion() { Nombre = "Producción", Puerto = 13306, Servidor = "192.168.200.1", Usuario = "m3soft", Contraseña = "îéÂj,íçLÑ0*B", Database = "GrupoSanchoToro" });
|
||||
lc.Add(new Conexion() { Nombre = "Producción", Puerto = 3306, Servidor = "10.10.10.1", Usuario = "root", Contraseña = "îéÂj,íçLÑ0*B", Database = "gruposanchotoro" });
|
||||
lc.Add(new Conexion() { Nombre = "Producción VPN", Puerto = 3306, Servidor = "10.10.10.1", Usuario = "root", Contraseña = "îéÂj,íçLÑ0*B", Database = "gruposanchotoro" });
|
||||
lc.Add(new Conexion() { Nombre = "Producción LOCAL", Puerto = 3306, Servidor = "192.168.41.44", Usuario = "root", Contraseña = "îéÂj,íçLÑ0*B", Database = "gruposanchotoro" });
|
||||
lc.Add(new Conexion() { Nombre = "Desarrollo", Puerto = 13306, Servidor = "localhost", Usuario = "root", Contraseña = "îéÂj,íçLÑ0*B", Database = "gruposanchotoro" });
|
||||
//lc.Add(new Conexion() { Nombre = "lunes", Puerto = 40001, Servidor = "192.168.200.1", Usuario = "m3soft", Contraseña = "îéÂj,íçLÑ0*B", Database = "GrupoSanchoToro" });
|
||||
@@ -65,21 +66,21 @@ namespace bdGrupoSanchoToro.dbcontext
|
||||
|
||||
var cn = lc.First(x => x.Nombre == NombreConexion);
|
||||
|
||||
string servidor = "";
|
||||
if (Environment.MachineName.ToUpper() == "SERVIDOR-ES")
|
||||
servidor = "localhost";
|
||||
else
|
||||
{
|
||||
servidor = cn.Servidor;
|
||||
try
|
||||
{
|
||||
servidor = System.Net.Dns.GetHostEntry("servidorbd").AddressList[0].ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
cs = "server=" + servidor + ";pwd=" + tsUtilidades.crypt.FEncS(cn.Contraseña, @"[JO1]", @"[JD1]", -875421649) + ";port=" + cn.Puerto.ToString() + ";uid=" + cn.Usuario + ";database=" + cn.Database + cs;
|
||||
// string servidor = "";
|
||||
//if (Environment.MachineName.ToUpper() == "SERVIDOR-ES")
|
||||
// servidor = "localhost";
|
||||
//else
|
||||
//{
|
||||
// servidor = cn.Servidor;
|
||||
// try
|
||||
// {
|
||||
// servidor = System.Net.Dns.GetHostEntry("servidorbd").AddressList[0].ToString();
|
||||
// }
|
||||
// catch
|
||||
// {
|
||||
// }
|
||||
//}
|
||||
cs = "server=" + cn.Servidor + ";pwd=" + tsUtilidades.crypt.FEncS(cn.Contraseña, @"[JO1]", @"[JD1]", -875421649) + ";port=" + cn.Puerto.ToString() + ";uid=" + cn.Usuario + ";database=" + cn.Database + cs;
|
||||
return cs;
|
||||
}
|
||||
// End If
|
||||
|
||||
Reference in New Issue
Block a user