2026/07/01-01
This commit is contained in:
@@ -84,6 +84,8 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<facturasrecibidas> facturasrecibidas { get; set; }
|
||||
|
||||
public virtual DbSet<familias> familias { get; set; }
|
||||
|
||||
public virtual DbSet<ficheros> ficheros { get; set; }
|
||||
|
||||
public virtual DbSet<ficherosadjuntos> ficherosadjuntos { get; set; }
|
||||
@@ -142,7 +144,7 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
public virtual DbSet<v_albaranesextendidos> v_albaranesextendidos { get; set; }
|
||||
|
||||
public virtual DbSet<versiones> versiones { get; set; }
|
||||
public virtual DbSet<versionesgruas> versionesgruas { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -1518,6 +1520,28 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasConstraintName("facturasrecibidas_usuarios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<familias>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idFamilia).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idUsuario, "familias_usuarios_idx");
|
||||
|
||||
entity.Property(e => e.Codigo).HasMaxLength(10);
|
||||
entity.Property(e => e.CuentaContableCompra).HasMaxLength(10);
|
||||
entity.Property(e => e.CuentaContableCompraAlquiler).HasMaxLength(10);
|
||||
entity.Property(e => e.CuentaContableVenta).HasMaxLength(10);
|
||||
entity.Property(e => e.CuentaContableVentaAlquiler).HasMaxLength(10);
|
||||
entity.Property(e => e.Descripcion).HasMaxLength(45);
|
||||
|
||||
entity.HasOne(d => d.idUsuarioNavigation).WithMany(p => p.familias)
|
||||
.HasForeignKey(d => d.idUsuario)
|
||||
.HasConstraintName("familias_usuarios");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ficheros>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idFichero).HasName("PRIMARY");
|
||||
@@ -2051,6 +2075,8 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
{
|
||||
entity.HasKey(e => e.idProducto).HasName("PRIMARY");
|
||||
|
||||
entity.HasIndex(e => e.Codigo, "Codigo_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.Descripcion, "Descripcion_UNIQUE").IsUnique();
|
||||
|
||||
entity.HasIndex(e => e.idUsuarioCreador, "productos_01_usuarios_idx");
|
||||
@@ -2061,6 +2087,7 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
|
||||
entity.HasIndex(e => e.idFamilia, "productos_familias_idx");
|
||||
|
||||
entity.Property(e => e.Codigo).HasMaxLength(40);
|
||||
entity.Property(e => e.CodigoBarras).HasMaxLength(16);
|
||||
entity.Property(e => e.ControlarEnAlbaran).HasMaxLength(2);
|
||||
entity.Property(e => e.CorrespondenciaPatas).HasMaxLength(45);
|
||||
@@ -2088,6 +2115,10 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
.HasForeignKey(d => d.idEmpresa)
|
||||
.HasConstraintName("productos_empresas");
|
||||
|
||||
entity.HasOne(d => d.idFamiliaNavigation).WithMany(p => p.productos)
|
||||
.HasForeignKey(d => d.idFamilia)
|
||||
.HasConstraintName("productos_familias");
|
||||
|
||||
entity.HasOne(d => d.idUsuarioCreadorNavigation).WithMany(p => p.productosidUsuarioCreadorNavigation)
|
||||
.HasForeignKey(d => d.idUsuarioCreador)
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
@@ -2409,7 +2440,7 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
entity.Property(e => e.idEvento).HasDefaultValueSql("'0'");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<versiones>(entity =>
|
||||
modelBuilder.Entity<versionesgruas>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.idVersion).HasName("PRIMARY");
|
||||
|
||||
@@ -2420,7 +2451,7 @@ public partial class GrupoSanchoToroContext : DbContext
|
||||
entity.Property(e => e.idVersion).ValueGeneratedNever();
|
||||
entity.Property(e => e.Observaciones).HasMaxLength(50);
|
||||
|
||||
entity.HasOne(d => d.idModeloNavigation).WithMany(p => p.versiones)
|
||||
entity.HasOne(d => d.idModeloNavigation).WithMany(p => p.versionesgruas)
|
||||
.HasForeignKey(d => d.idModelo)
|
||||
.HasConstraintName("versiones_modelosgruas");
|
||||
});
|
||||
|
||||
@@ -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