diff --git a/ServicioGrupoSanchoToro/Worker.cs b/ServicioGrupoSanchoToro/Worker.cs index 93957ed..acda055 100644 --- a/ServicioGrupoSanchoToro/Worker.cs +++ b/ServicioGrupoSanchoToro/Worker.cs @@ -39,7 +39,7 @@ namespace ServicioGrupoSanchoToro string Mensaje = "Servicio GrupoSanchoToro Iniciado. Versión: " + tsUtilidades.Utilidades.ExtraeValorCadena(Assembly.GetExecutingAssembly().FullName, "Version"); try { - bdGrupoSanchoToro.Importaciones.ImportarTodo.ImportarPersonal(GeneraLogErrores); + bdGrupoSanchoToro.Importaciones.ImportarTodo.Importar(GeneraLogErrores); return; @@ -96,6 +96,11 @@ namespace ServicioGrupoSanchoToro } } + + private void GeneraLogErrores(Exception ex) + { + Logs.AñadeLog(tsUtilidades.Enumeraciones.TipoLog.Fallo, ex.Message, ex.Message); + } } diff --git a/bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs b/bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs index 09b2947..469567f 100644 --- a/bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs +++ b/bdGrupoSanchoToro/Importaciones/ImportaGRUASGC.cs @@ -1,145 +1,108 @@ -using Microsoft.VisualBasic; +using bdGrupoSanchoToro.db; +using Microsoft.VisualBasic; using System; using System.Collections.Generic; +using System.Diagnostics.Eventing.Reader; using System.Globalization; using System.Linq; +using System.Linq.Dynamic.Core; using System.Text; using System.Threading.Tasks; namespace bdGrupoSanchoToro.Importaciones { - public class ImportaAccesorios + public class ImportaGRUASGC { public static void Importar(byte[] Fichero) { try { var bd = tscGrupoSanchoToro.NuevoContexto(); - var accs = bd.accesorios.ToList(); - var le = bd.enumeraciones.ToList(); - - var prodsela = bd.productoselaborados.ToList(); - var gruprods = bd.gruposdeproductos.ToList(); - var lcaag = bd.codigosdeaccesoriosagrupados.ToList(); - var lusus = bd.usuarios.ToList(); - - var dsprueba = new XSD.ALMACENAC(); + var dsprueba = new XSD.GRUASGC(); dsprueba.ReadXml(new System.IO.MemoryStream(Fichero)); - int i = 1; int Ultimalinea = dsprueba.Tables["Datos"].Rows.Count; - foreach (XSD.ALMACENAC.DatosRow Proant in dsprueba.Tables["Datos"].Rows) + List lg = bd.modelosgruas.ToList(); + var lm = bd.marcasgruas.ToList(); + var lv = bd.versionesgruas.ToList(); + var grs = dsprueba.Tables["Datos"].Rows.Cast().ToList().OrderBy(x=> OrdenGRUASGC(x)).ToList(); + + foreach (XSD.GRUASGC.DatosRow gr in grs) { try { - bdGrupoSanchoToro.db.accesorios Pronue =accs.FirstOrDefault(x => x.CodigoDeAccesorio == Proant.ALCOD.Trim()); - if (Pronue==null) + productos pr; + var mar = lm.First(x => x.Marca == gr.CGMAR); + bdGrupoSanchoToro.db.modelosgruas n = lg.FirstOrDefault(x => x.idMarcaNavigation.Marca == mar.Marca && x.Modelo == gr.CGMDL); + if (n == null) { - Pronue = new bdGrupoSanchoToro.db.accesorios(); - bd.accesorios.Add(Pronue); - } - Pronue.CodigoDeAccesorio = Proant.ALCOD; - Pronue.DescripcionDeAccesorio = Proant.ALDES; - Pronue.idGrupoDeProducto = null; - if (Proant.ALGPR.Trim()!="") - { - var grupodeproducto = gruprods.FirstOrDefault(x => x.CodigoGrupoProductos == Proant.ALGPR.Trim()); - if (grupodeproducto!=null) Pronue.idGrupoDeProducto = grupodeproducto.idGrupoDeProducto; - } - Pronue.idProductoElaborado = null; - if (Proant.ALCPEC.Trim()!="") - { - var productoelaborado =prodsela.FirstOrDefault(x => x.CodigoDeProductoElaborado == Proant.ALCPEC.Trim()); - if (productoelaborado!=null) Pronue.idProductoElaborado = productoelaborado.idProductoElaborado; - } - Pronue.idExpresionDeCantidad = null; - if (Proant.ALECAN.Trim()!="") - { - Pronue.idExpresionDeCantidad = le.First(x => x.Codigo == "ECAN." + Proant.ALECAN.Trim()).idEnumeracion; - } - else - { - Pronue.idExpresionDeCantidad = null; - } - - var enumeracion = le.First(x => x.Codigo == "TAC." + Proant.ALTIPO.Trim()); - Pronue.idTipoDeAccesorio = enumeracion.idEnumeracion; - - Pronue.idSubtipoDeAccesorio = le.First(x => x.Codigo.Trim() == "STA." + Proant.ALSTIP.Trim()).idEnumeracion; - - Pronue.idCodigoAgrupado = null; - if (Proant.ALCODAG.Trim()!="") - { - var Codagru = lcaag.FirstOrDefault(x => x.CodigoAgrupado == Proant.ALCODAG.Trim()); - if (Codagru!=null) Pronue.idCodigoAgrupado = Codagru.idCodigoDeaccesorioAgrupado; - } - Pronue.RangoPermitido1 = double.Parse(Proant.ALRANGO1, CultureInfo.InvariantCulture); - Pronue.RangoPermitido2 = double.Parse(Proant.ALRANGO2, CultureInfo.InvariantCulture); - Pronue.Facturable = false; - if (Proant.ALFAC.Trim() == "S") - { - Pronue.Facturable = true; - } - Pronue.Precio = double.Parse(Proant.ALPRE, CultureInfo.InvariantCulture); - Pronue.PrecioDeCosteMedio = double.Parse(Proant.ALPCM, CultureInfo.InvariantCulture); - Pronue.Existencia = double.Parse(Proant.ALEXI, CultureInfo.InvariantCulture); - Pronue.ExistenciaMinima = double.Parse(Proant.ALEXIM, CultureInfo.InvariantCulture); - Pronue.Peso = double.Parse(Proant.ALPESO, CultureInfo.InvariantCulture); - Pronue.PrecioDeCosteAplicado = double.Parse(Proant.ALPCOA, CultureInfo.InvariantCulture); - Pronue.CuentaDeCompras1 = Proant.ALNCUC1; - Pronue.CuentaDeCompras2 = Proant.ALNCUC2; - Pronue.CuentaDeCompras3 = Proant.ALNCUC3; - Pronue.CuentaDeCompras4 = Proant.ALNCUC4; - Pronue.CuentaDeVentas1 = Proant.ALNCUV1; - Pronue.CuentaDeVentas2 = Proant.ALNCUV2; - Pronue.CuentaDeVentas3 = Proant.ALNCUV3; - Pronue.CuentaDeVentas4 = Proant.ALNCUV4; - //if (bd.cuentasanaliticas.Any(x => x.CodigoCuenta.Trim() == Proant.ALNCUA.Trim())) - //{ - // var Cuenta = bd.cuentasanaliticas.First(x => x.CodigoCuenta == Proant.ALNCUA.Trim()); - // Pronue.idCuentaAnalitica = 0; // cuentasanaliticas.idcuentasanaliticas - //} - Pronue.FechaDeAlta = (DateOnly)tsUtilidades.Extensiones.StringExtensions.FechaStringADateOnly(Proant.ALFAL); - Pronue.FechaDeBaja = tsUtilidades.Extensiones.StringExtensions.FechaStringADateOnly(Proant.ALFBA); - - Pronue.idGrupoDeAccesorios = le.First(x => x.Codigo == "GRA." + Proant.ALGRU.Trim()).idEnumeracion; - - Pronue.idNaturalezaDelGasto = le.First(x => x.Codigo == "NGA." + Proant.ALNGA.Trim()).idEnumeracion; - Pronue.Subvencion = false; - if (Proant.ALSSN.Trim() == "S") - { - Pronue.Subvencion = true; - } - Pronue.PorcentajedeSubvencion = double.Parse(Proant.ALSPO, CultureInfo.InvariantCulture); - Pronue.ReferenciaDelProveedor = Proant.ALSLA; - Pronue.idTipoDeIva = null; - if (Proant.ALTIVA.Trim()!="") - { - Pronue.idTipoDeIva = le.First(x => x.Codigo == "TIVA." + Proant.ALTIVA.Trim()).idEnumeracion; - } - Pronue.FechaUltimoRecuento = tsUtilidades.Extensiones.StringExtensions.FechaStringADate(Proant.ALFURE); - Pronue.ActualizacionExistencias = false; - if (double.Parse(Proant.ALNL4) == 1) - { - Pronue.ActualizacionExistencias = true; - } - Pronue.idModificadoPor = null; - if (Proant.ALUUM.Trim()!="") - { - var usuario = lusus.FirstOrDefault(x => x.Usuario == Proant.ALUUM.Trim()); - if(usuario!=null) Pronue.idModificadoPor = usuario.idUsuario; - } - string minuseg = (double.Parse(Proant.ALHUM, CultureInfo.InvariantCulture) * 100).ToString(); - var fechahora = tsUtilidades.Extensiones.StringExtensions.FechaHoraStringADateTime(Proant.ALFUM + "." + minuseg.PadLeft(4, '0').Substring(0, 4)); - Pronue.FechaUltimaModificacion = fechahora; - Pronue.Situacion = Proant.ALSIT; - Pronue.Observaciones = Proant.ALOBS; - i = i + 1; - if (i > 1000) - { - i=0; + pr = new productos() + { + Codigo = "GR-" + gr.CGCOD, + Descripcion = "GRÚA " + mar.Marca + " " + gr.CGMDL + }; + bd.productos.Add(pr); + n = new bdGrupoSanchoToro.db.modelosgruas(); + bd.modelosgruas.Add(n); + n.idMarcaNavigation = mar; + n.idProductoNavigation = pr; + n.FechaAlta = DateTime.Now; bd.SaveChanges(); - bd = tscGrupoSanchoToro.NuevoContexto(); + } + VersionesGruasEnum ver; + if (gr.CGVER != "") + { + + switch (gr.CGVER) + { + case "APOYADA": + { + ver = VersionesGruasEnum.APOYADA; + break; + } + case "EMPOTRADA": + { + ver = VersionesGruasEnum.EMPOTRADA; + break; + } + case "TRASLACION": + case "CON TRASLACION": + { + ver = VersionesGruasEnum.CON_TRASLACION; + break; + } + case "AUTOMONTANTE": + { + ver = VersionesGruasEnum.AUTOMONTANTE; + break; + } + case "MONOCOLUMNA": + { + ver = VersionesGruasEnum.MONOCOLUMNA; + break; + } + case "BICOLUMNA": + { + ver = VersionesGruasEnum.BICOLUMNA; + break; + } + default: + ver = VersionesGruasEnum.EMPOTRADA; + break; + } + var vg = lv.FirstOrDefault(x => x.idModeloNavigation.Modelo == gr.CGMDL && x.idModeloNavigation.idMarcaNavigation.Marca == gr.CGMAR && x.Version == (int)ver); + if (vg != null) + { + vg = new versionesgruas() + { + Version = (int)ver, + idModeloNavigation = n + }; + bd.versionesgruas.Add(vg); + lv.Add(vg); + bd.SaveChanges(); + } + } } catch (Exception ex) @@ -154,6 +117,24 @@ namespace bdGrupoSanchoToro.Importaciones throw new Exception(ex.Message, ex); } } + internal static int OrdenGRUASGC(XSD.GRUASGC.DatosRow row) + { + if (row.CGTIP=="G") + { + if (row.CGVER=="") + { + return 0; + } + else + { + return 1; + } + } + else + { + return 2; + } + } } } diff --git a/bdGrupoSanchoToro/Importaciones/ImportarTodo.cs b/bdGrupoSanchoToro/Importaciones/ImportarTodo.cs index 234800f..fda8754 100644 --- a/bdGrupoSanchoToro/Importaciones/ImportarTodo.cs +++ b/bdGrupoSanchoToro/Importaciones/ImportarTodo.cs @@ -16,7 +16,7 @@ namespace bdGrupoSanchoToro.Importaciones tscGrupoSanchoToro bd = tscGrupoSanchoToro.NuevoContexto(); //00 - // Importa("GRUASGC", bdGrupoSanchoToro.Importaciones.ImportarGRUASGC.Importar, de); //00 + Importa("GRUASGC", bdGrupoSanchoToro.Importaciones.ImportaGRUASGC.Importar, de); //00 //Importa("GRUPRO", bdGrupoSanchoToro.Importaciones.ImportaGrupoProductos.Importar, de); //01 //Importa("CAMPAÑAS", bdGrupoSanchoToro.Importaciones.ImportaCampañas.Importar, de); //02 //Importa("PRODUCTOS", bdGrupoSanchoToro.Importaciones.ImportaProductos.Importar, de); //03 @@ -88,7 +88,7 @@ namespace bdGrupoSanchoToro.Importaciones try { string sCadServidor = (from c in bd.enumeraciones - where c.Codigo == "VAR.HP9000" + where c.Codigo == "CONF.HP9000" select c).First().ValorAlfabeticoLargo; string Servidor = sCadServidor.Split("@")[0]; string Usuario = sCadServidor.Split("@")[1].Split(":")[0]; diff --git a/bdGrupoSanchoToro/XSD/DAT-GRUASGC.Designer.cs b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.Designer.cs new file mode 100644 index 0000000..6b8c2c3 --- /dev/null +++ b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.Designer.cs @@ -0,0 +1,1337 @@ +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace bdGrupoSanchoToro.XSD { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("GRUASGC")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class GRUASGC : global::System.Data.DataSet { + + private DatosDataTable tableDatos; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public GRUASGC() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called" + + " or extended by application code.", DiagnosticId="SYSLIB0051")] + protected GRUASGC(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["Datos"] != null)) { + base.Tables.Add(new DatosDataTable(ds.Tables["Datos"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public DatosDataTable Datos { + get { + return this.tableDatos; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public override global::System.Data.DataSet Clone() { + GRUASGC cln = ((GRUASGC)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["Datos"] != null)) { + base.Tables.Add(new DatosDataTable(ds.Tables["Datos"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + internal void InitVars(bool initTable) { + this.tableDatos = ((DatosDataTable)(base.Tables["Datos"])); + if ((initTable == true)) { + if ((this.tableDatos != null)) { + this.tableDatos.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + private void InitClass() { + this.DataSetName = "GRUASGC"; + this.Prefix = ""; + this.Locale = new global::System.Globalization.CultureInfo("en-US"); + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableDatos = new DatosDataTable(); + base.Tables.Add(this.tableDatos); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + private bool ShouldSerializeDatos() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + GRUASGC ds = new GRUASGC(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public delegate void DatosRowChangeEventHandler(object sender, DatosRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class DatosDataTable : global::System.Data.TypedTableBase { + + private global::System.Data.DataColumn columnCGCOD; + + private global::System.Data.DataColumn columnCGDES; + + private global::System.Data.DataColumn columnCGTIP; + + private global::System.Data.DataColumn columnCGMAR; + + private global::System.Data.DataColumn columnCGMDL; + + private global::System.Data.DataColumn columnCGMDG; + + private global::System.Data.DataColumn columnCGVER; + + private global::System.Data.DataColumn columnCGEXP; + + private global::System.Data.DataColumn columnCGFAL; + + private global::System.Data.DataColumn columnCGFBA; + + private global::System.Data.DataColumn columnCGFIA; + + private global::System.Data.DataColumn columnCGFFA; + + private global::System.Data.DataColumn columnCGNL1; + + private global::System.Data.DataColumn columnCGNL2; + + private global::System.Data.DataColumn columnCGNL3; + + private global::System.Data.DataColumn columnCGNL4; + + private global::System.Data.DataColumn columnCGSIT; + + private global::System.Data.DataColumn columnCGOBS; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosDataTable() { + this.TableName = "Datos"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + internal DatosDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [System.ObsoleteAttribute("This API supports obsolete formatter-based serialization. It should not be called" + + " or extended by application code.", DiagnosticId="SYSLIB0051")] + protected DatosDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGCODColumn { + get { + return this.columnCGCOD; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGDESColumn { + get { + return this.columnCGDES; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGTIPColumn { + get { + return this.columnCGTIP; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGMARColumn { + get { + return this.columnCGMAR; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGMDLColumn { + get { + return this.columnCGMDL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGMDGColumn { + get { + return this.columnCGMDG; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGVERColumn { + get { + return this.columnCGVER; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGEXPColumn { + get { + return this.columnCGEXP; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGFALColumn { + get { + return this.columnCGFAL; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGFBAColumn { + get { + return this.columnCGFBA; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGFIAColumn { + get { + return this.columnCGFIA; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGFFAColumn { + get { + return this.columnCGFFA; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGNL1Column { + get { + return this.columnCGNL1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGNL2Column { + get { + return this.columnCGNL2; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGNL3Column { + get { + return this.columnCGNL3; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGNL4Column { + get { + return this.columnCGNL4; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGSITColumn { + get { + return this.columnCGSIT; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataColumn CGOBSColumn { + get { + return this.columnCGOBS; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosRow this[int index] { + get { + return ((DatosRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public event DatosRowChangeEventHandler DatosRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public event DatosRowChangeEventHandler DatosRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public event DatosRowChangeEventHandler DatosRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public event DatosRowChangeEventHandler DatosRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void AddDatosRow(DatosRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosRow AddDatosRow( + string CGCOD, + string CGDES, + string CGTIP, + string CGMAR, + string CGMDL, + string CGMDG, + string CGVER, + string CGEXP, + string CGFAL, + string CGFBA, + string CGFIA, + string CGFFA, + string CGNL1, + string CGNL2, + string CGNL3, + string CGNL4, + string CGSIT, + string CGOBS) { + DatosRow rowDatosRow = ((DatosRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + CGCOD, + CGDES, + CGTIP, + CGMAR, + CGMDL, + CGMDG, + CGVER, + CGEXP, + CGFAL, + CGFBA, + CGFIA, + CGFFA, + CGNL1, + CGNL2, + CGNL3, + CGNL4, + CGSIT, + CGOBS}; + rowDatosRow.ItemArray = columnValuesArray; + this.Rows.Add(rowDatosRow); + return rowDatosRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public override global::System.Data.DataTable Clone() { + DatosDataTable cln = ((DatosDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new DatosDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + internal void InitVars() { + this.columnCGCOD = base.Columns["CGCOD"]; + this.columnCGDES = base.Columns["CGDES"]; + this.columnCGTIP = base.Columns["CGTIP"]; + this.columnCGMAR = base.Columns["CGMAR"]; + this.columnCGMDL = base.Columns["CGMDL"]; + this.columnCGMDG = base.Columns["CGMDG"]; + this.columnCGVER = base.Columns["CGVER"]; + this.columnCGEXP = base.Columns["CGEXP"]; + this.columnCGFAL = base.Columns["CGFAL"]; + this.columnCGFBA = base.Columns["CGFBA"]; + this.columnCGFIA = base.Columns["CGFIA"]; + this.columnCGFFA = base.Columns["CGFFA"]; + this.columnCGNL1 = base.Columns["CGNL1"]; + this.columnCGNL2 = base.Columns["CGNL2"]; + this.columnCGNL3 = base.Columns["CGNL3"]; + this.columnCGNL4 = base.Columns["CGNL4"]; + this.columnCGSIT = base.Columns["CGSIT"]; + this.columnCGOBS = base.Columns["CGOBS"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + private void InitClass() { + this.columnCGCOD = new global::System.Data.DataColumn("CGCOD", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGCOD); + this.columnCGDES = new global::System.Data.DataColumn("CGDES", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGDES); + this.columnCGTIP = new global::System.Data.DataColumn("CGTIP", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGTIP); + this.columnCGMAR = new global::System.Data.DataColumn("CGMAR", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGMAR); + this.columnCGMDL = new global::System.Data.DataColumn("CGMDL", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGMDL); + this.columnCGMDG = new global::System.Data.DataColumn("CGMDG", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGMDG); + this.columnCGVER = new global::System.Data.DataColumn("CGVER", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGVER); + this.columnCGEXP = new global::System.Data.DataColumn("CGEXP", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGEXP); + this.columnCGFAL = new global::System.Data.DataColumn("CGFAL", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGFAL); + this.columnCGFBA = new global::System.Data.DataColumn("CGFBA", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGFBA); + this.columnCGFIA = new global::System.Data.DataColumn("CGFIA", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGFIA); + this.columnCGFFA = new global::System.Data.DataColumn("CGFFA", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGFFA); + this.columnCGNL1 = new global::System.Data.DataColumn("CGNL1", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGNL1); + this.columnCGNL2 = new global::System.Data.DataColumn("CGNL2", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGNL2); + this.columnCGNL3 = new global::System.Data.DataColumn("CGNL3", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGNL3); + this.columnCGNL4 = new global::System.Data.DataColumn("CGNL4", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGNL4); + this.columnCGSIT = new global::System.Data.DataColumn("CGSIT", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGSIT); + this.columnCGOBS = new global::System.Data.DataColumn("CGOBS", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCGOBS); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosRow NewDatosRow() { + return ((DatosRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new DatosRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override global::System.Type GetRowType() { + return typeof(DatosRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.DatosRowChanged != null)) { + this.DatosRowChanged(this, new DatosRowChangeEvent(((DatosRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.DatosRowChanging != null)) { + this.DatosRowChanging(this, new DatosRowChangeEvent(((DatosRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.DatosRowDeleted != null)) { + this.DatosRowDeleted(this, new DatosRowChangeEvent(((DatosRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.DatosRowDeleting != null)) { + this.DatosRowDeleting(this, new DatosRowChangeEvent(((DatosRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void RemoveDatosRow(DatosRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + GRUASGC ds = new GRUASGC(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "DatosDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class DatosRow : global::System.Data.DataRow { + + private DatosDataTable tableDatos; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + internal DatosRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableDatos = ((DatosDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGCOD { + get { + try { + return ((string)(this[this.tableDatos.CGCODColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGCOD\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGCODColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGDES { + get { + try { + return ((string)(this[this.tableDatos.CGDESColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGDES\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGDESColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGTIP { + get { + try { + return ((string)(this[this.tableDatos.CGTIPColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGTIP\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGTIPColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGMAR { + get { + try { + return ((string)(this[this.tableDatos.CGMARColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGMAR\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGMARColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGMDL { + get { + try { + return ((string)(this[this.tableDatos.CGMDLColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGMDL\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGMDLColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGMDG { + get { + try { + return ((string)(this[this.tableDatos.CGMDGColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGMDG\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGMDGColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGVER { + get { + try { + return ((string)(this[this.tableDatos.CGVERColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGVER\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGVERColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGEXP { + get { + try { + return ((string)(this[this.tableDatos.CGEXPColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGEXP\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGEXPColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGFAL { + get { + try { + return ((string)(this[this.tableDatos.CGFALColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGFAL\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGFALColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGFBA { + get { + try { + return ((string)(this[this.tableDatos.CGFBAColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGFBA\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGFBAColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGFIA { + get { + try { + return ((string)(this[this.tableDatos.CGFIAColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGFIA\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGFIAColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGFFA { + get { + try { + return ((string)(this[this.tableDatos.CGFFAColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGFFA\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGFFAColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGNL1 { + get { + try { + return ((string)(this[this.tableDatos.CGNL1Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGNL1\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGNL1Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGNL2 { + get { + try { + return ((string)(this[this.tableDatos.CGNL2Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGNL2\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGNL2Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGNL3 { + get { + try { + return ((string)(this[this.tableDatos.CGNL3Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGNL3\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGNL3Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGNL4 { + get { + try { + return ((string)(this[this.tableDatos.CGNL4Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGNL4\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGNL4Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGSIT { + get { + try { + return ((string)(this[this.tableDatos.CGSITColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGSIT\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGSITColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public string CGOBS { + get { + try { + return ((string)(this[this.tableDatos.CGOBSColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("El valor de la columna \'CGOBS\' de la tabla \'Datos\' es DBNull.", e); + } + } + set { + this[this.tableDatos.CGOBSColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGCODNull() { + return this.IsNull(this.tableDatos.CGCODColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGCODNull() { + this[this.tableDatos.CGCODColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGDESNull() { + return this.IsNull(this.tableDatos.CGDESColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGDESNull() { + this[this.tableDatos.CGDESColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGTIPNull() { + return this.IsNull(this.tableDatos.CGTIPColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGTIPNull() { + this[this.tableDatos.CGTIPColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGMARNull() { + return this.IsNull(this.tableDatos.CGMARColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGMARNull() { + this[this.tableDatos.CGMARColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGMDLNull() { + return this.IsNull(this.tableDatos.CGMDLColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGMDLNull() { + this[this.tableDatos.CGMDLColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGMDGNull() { + return this.IsNull(this.tableDatos.CGMDGColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGMDGNull() { + this[this.tableDatos.CGMDGColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGVERNull() { + return this.IsNull(this.tableDatos.CGVERColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGVERNull() { + this[this.tableDatos.CGVERColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGEXPNull() { + return this.IsNull(this.tableDatos.CGEXPColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGEXPNull() { + this[this.tableDatos.CGEXPColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGFALNull() { + return this.IsNull(this.tableDatos.CGFALColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGFALNull() { + this[this.tableDatos.CGFALColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGFBANull() { + return this.IsNull(this.tableDatos.CGFBAColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGFBANull() { + this[this.tableDatos.CGFBAColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGFIANull() { + return this.IsNull(this.tableDatos.CGFIAColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGFIANull() { + this[this.tableDatos.CGFIAColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGFFANull() { + return this.IsNull(this.tableDatos.CGFFAColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGFFANull() { + this[this.tableDatos.CGFFAColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGNL1Null() { + return this.IsNull(this.tableDatos.CGNL1Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGNL1Null() { + this[this.tableDatos.CGNL1Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGNL2Null() { + return this.IsNull(this.tableDatos.CGNL2Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGNL2Null() { + this[this.tableDatos.CGNL2Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGNL3Null() { + return this.IsNull(this.tableDatos.CGNL3Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGNL3Null() { + this[this.tableDatos.CGNL3Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGNL4Null() { + return this.IsNull(this.tableDatos.CGNL4Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGNL4Null() { + this[this.tableDatos.CGNL4Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGSITNull() { + return this.IsNull(this.tableDatos.CGSITColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGSITNull() { + this[this.tableDatos.CGSITColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public bool IsCGOBSNull() { + return this.IsNull(this.tableDatos.CGOBSColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public void SetCGOBSNull() { + this[this.tableDatos.CGOBSColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public class DatosRowChangeEvent : global::System.EventArgs { + + private DatosRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosRowChangeEvent(DatosRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public DatosRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "18.0.0.0")] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsc b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsc new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsc @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsd b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsd new file mode 100644 index 0000000..9b33a14 --- /dev/null +++ b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xss b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xss new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/bdGrupoSanchoToro/XSD/DAT-GRUASGC.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bdGrupoSanchoToro/bdGrupoSanchoToro.csproj b/bdGrupoSanchoToro/bdGrupoSanchoToro.csproj index 59b24cd..95d91f0 100644 --- a/bdGrupoSanchoToro/bdGrupoSanchoToro.csproj +++ b/bdGrupoSanchoToro/bdGrupoSanchoToro.csproj @@ -35,4 +35,19 @@ + + + True + True + DAT-GRUASGC.xsd + + + + + + MSDataSetGenerator + DAT-GRUASGC.Designer.cs + + + diff --git a/bdGrupoSanchoToro/db/familias.cs b/bdGrupoSanchoToro/db/familias.cs new file mode 100644 index 0000000..28f791a --- /dev/null +++ b/bdGrupoSanchoToro/db/familias.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using PropertyChanged; + +namespace bdGrupoSanchoToro.db; + +[AddINotifyPropertyChangedInterface] +public partial class familias +{ + public int idFamilia { get; set; } + + public string? Codigo { get; set; } + + public string? Descripcion { get; set; } + + public int? idUsuario { get; set; } + + public string? CuentaContableVenta { get; set; } + + public string? CuentaContableVentaAlquiler { get; set; } + + public string? CuentaContableCompra { get; set; } + + public string? CuentaContableCompraAlquiler { get; set; } + + public virtual usuarios? idUsuarioNavigation { get; set; } + + public virtual ICollection productos { get; set; } = new List(); +} diff --git a/bdGrupoSanchoToro/db/modelosgruas.cs b/bdGrupoSanchoToro/db/modelosgruas.cs index 84fd60d..7a48f39 100644 --- a/bdGrupoSanchoToro/db/modelosgruas.cs +++ b/bdGrupoSanchoToro/db/modelosgruas.cs @@ -25,5 +25,5 @@ public partial class modelosgruas public virtual ICollection tablaplumas { get; set; } = new List(); - public virtual ICollection versiones { get; set; } = new List(); + public virtual ICollection versionesgruas { get; set; } = new List(); } diff --git a/bdGrupoSanchoToro/db/productos.cs b/bdGrupoSanchoToro/db/productos.cs index f36ba23..2e4a988 100644 --- a/bdGrupoSanchoToro/db/productos.cs +++ b/bdGrupoSanchoToro/db/productos.cs @@ -9,6 +9,8 @@ public partial class productos { public int idProducto { get; set; } + public string Codigo { get; set; } = null!; + public string? DescripcionAbreviada { get; set; } public string Descripcion { get; set; } = null!; @@ -89,6 +91,8 @@ public partial class productos public virtual empresas idEmpresaNavigation { get; set; } = null!; + public virtual familias? idFamiliaNavigation { get; set; } + public virtual usuarios? idUsuarioCreadorNavigation { get; set; } public virtual usuarios? idUsuarioModificadorNavigation { get; set; } diff --git a/bdGrupoSanchoToro/db/tablaalturas.cs b/bdGrupoSanchoToro/db/tablaalturas.cs index 28ab776..2f2f1b9 100644 --- a/bdGrupoSanchoToro/db/tablaalturas.cs +++ b/bdGrupoSanchoToro/db/tablaalturas.cs @@ -19,5 +19,5 @@ public partial class tablaalturas public virtual modelosgruas idModeloNavigation { get; set; } = null!; - public virtual versiones? idVersionNavigation { get; set; } + public virtual versionesgruas? idVersionNavigation { get; set; } } diff --git a/bdGrupoSanchoToro/db/usuarios.cs b/bdGrupoSanchoToro/db/usuarios.cs index 57aa9ed..ed59a62 100644 --- a/bdGrupoSanchoToro/db/usuarios.cs +++ b/bdGrupoSanchoToro/db/usuarios.cs @@ -55,6 +55,8 @@ public partial class usuarios public virtual ICollection facturasrecibidas { get; set; } = new List(); + public virtual ICollection familias { get; set; } = new List(); + public virtual gruposusuarios? idGrupoNavigation { get; set; } public virtual enumeraciones? idTemaNavigation { get; set; } diff --git a/bdGrupoSanchoToro/db/versiones.cs b/bdGrupoSanchoToro/db/versionesgruas.cs similarity index 93% rename from bdGrupoSanchoToro/db/versiones.cs rename to bdGrupoSanchoToro/db/versionesgruas.cs index 8d953f8..ccb31f6 100644 --- a/bdGrupoSanchoToro/db/versiones.cs +++ b/bdGrupoSanchoToro/db/versionesgruas.cs @@ -5,7 +5,7 @@ using PropertyChanged; namespace bdGrupoSanchoToro.db; [AddINotifyPropertyChangedInterface] -public partial class versiones +public partial class versionesgruas { public int idVersion { get; set; } diff --git a/bdGrupoSanchoToro/dbcontext/GrupoSanchoToroContext.cs b/bdGrupoSanchoToro/dbcontext/GrupoSanchoToroContext.cs index 082a835..f8cbd99 100644 --- a/bdGrupoSanchoToro/dbcontext/GrupoSanchoToroContext.cs +++ b/bdGrupoSanchoToro/dbcontext/GrupoSanchoToroContext.cs @@ -84,6 +84,8 @@ public partial class GrupoSanchoToroContext : DbContext public virtual DbSet facturasrecibidas { get; set; } + public virtual DbSet familias { get; set; } + public virtual DbSet ficheros { get; set; } public virtual DbSet ficherosadjuntos { get; set; } @@ -142,7 +144,7 @@ public partial class GrupoSanchoToroContext : DbContext public virtual DbSet v_albaranesextendidos { get; set; } - public virtual DbSet versiones { get; set; } + public virtual DbSet versionesgruas { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -1518,6 +1520,28 @@ public partial class GrupoSanchoToroContext : DbContext .HasConstraintName("facturasrecibidas_usuarios"); }); + modelBuilder.Entity(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(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(entity => + modelBuilder.Entity(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"); }); diff --git a/bdGrupoSanchoToro/dbcontext/conexion.cs b/bdGrupoSanchoToro/dbcontext/conexion.cs index f63ca04..4b8bc4d 100644 --- a/bdGrupoSanchoToro/dbcontext/conexion.cs +++ b/bdGrupoSanchoToro/dbcontext/conexion.cs @@ -25,6 +25,7 @@ namespace bdGrupoSanchoToro.dbcontext List lc = new List(); //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 diff --git a/bdGrupoSanchoToro/efpt.config.json b/bdGrupoSanchoToro/efpt.config.json index e783e21..447bebe 100644 --- a/bdGrupoSanchoToro/efpt.config.json +++ b/bdGrupoSanchoToro/efpt.config.json @@ -159,6 +159,10 @@ "Name": "facturasrecibidas", "ObjectType": 0 }, + { + "Name": "familias", + "ObjectType": 0 + }, { "Name": "ficheros", "ObjectType": 0 @@ -272,7 +276,7 @@ "ObjectType": 0 }, { - "Name": "versiones", + "Name": "versionesgruas", "ObjectType": 0 }, { diff --git a/bdGrupoSanchoToro/extensiones/productos.cs b/bdGrupoSanchoToro/extensiones/productos.cs index 762728f..482bb0c 100644 --- a/bdGrupoSanchoToro/extensiones/productos.cs +++ b/bdGrupoSanchoToro/extensiones/productos.cs @@ -32,14 +32,14 @@ namespace bdGrupoSanchoToro.db } } } - [NotMapped] - public string DescripcionTipo - { - get - { - return ((TipoProductoEnum)this.Tipo).ToString().Replace("_", " "); - } - } + // [NotMapped] + //public string DescripcionTipo + //{ + // get + // { + // return ((TipoProductoEnum)this.Tipo).ToString().Replace("_", " "); + // } + //} public enum TipoProductoEnum { diff --git a/bdGrupoSanchoToro/extensiones/versionesgruas.cs b/bdGrupoSanchoToro/extensiones/versionesgruas.cs new file mode 100644 index 0000000..38558ee --- /dev/null +++ b/bdGrupoSanchoToro/extensiones/versionesgruas.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace bdGrupoSanchoToro.db +{ + public partial class versionesgruas + { + + } + public enum VersionesGruasEnum + { + APOYADA = 1, + AUTOMONTANTE = 2, + BICOLUMNA = 3, + EMPOTRADA = 4, + MONOCOLUMNA = 5, + CON_TRASLACION = 6 + } +}