//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.2032
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace Seguridad.DataSetFT {
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class DSEmpresaAno : DataSet {
        
        private EmpresaAnoDataTable tableEmpresaAno;
        
        public DSEmpresaAno() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSEmpresaAno(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["EmpresaAno"] != null)) {
                    this.Tables.Add(new EmpresaAnoDataTable(ds.Tables["EmpresaAno"]));
                }
                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, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EmpresaAnoDataTable EmpresaAno {
            get {
                return this.tableEmpresaAno;
            }
        }
        
        public override DataSet Clone() {
            DSEmpresaAno cln = ((DSEmpresaAno)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["EmpresaAno"] != null)) {
                this.Tables.Add(new EmpresaAnoDataTable(ds.Tables["EmpresaAno"]));
            }
            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, System.Data.MissingSchemaAction.Add);
            this.InitVars();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableEmpresaAno = ((EmpresaAnoDataTable)(this.Tables["EmpresaAno"]));
            if ((this.tableEmpresaAno != null)) {
                this.tableEmpresaAno.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSEmpresaAno";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSEmpresaAno.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableEmpresaAno = new EmpresaAnoDataTable();
            this.Tables.Add(this.tableEmpresaAno);
        }
        
        private bool ShouldSerializeEmpresaAno() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void EmpresaAnoRowChangeEventHandler(object sender, EmpresaAnoRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EmpresaAnoDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnidSistema;
            
            private DataColumn columnidCodEmpresa;
            
            private DataColumn columnAno;
            
            private DataColumn columnLogo;
            
            private DataColumn columnRut;
            
            private DataColumn columnDigito;
            
            internal EmpresaAnoDataTable() : 
                    base("EmpresaAno") {
                this.InitClass();
            }
            
            internal EmpresaAnoDataTable(DataTable table) : 
                    base(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;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn idSistemaColumn {
                get {
                    return this.columnidSistema;
                }
            }
            
            internal DataColumn idCodEmpresaColumn {
                get {
                    return this.columnidCodEmpresa;
                }
            }
            
            internal DataColumn AnoColumn {
                get {
                    return this.columnAno;
                }
            }
            
            internal DataColumn LogoColumn {
                get {
                    return this.columnLogo;
                }
            }
            
            internal DataColumn RutColumn {
                get {
                    return this.columnRut;
                }
            }
            
            internal DataColumn DigitoColumn {
                get {
                    return this.columnDigito;
                }
            }
            
            public EmpresaAnoRow this[int index] {
                get {
                    return ((EmpresaAnoRow)(this.Rows[index]));
                }
            }
            
            public event EmpresaAnoRowChangeEventHandler EmpresaAnoRowChanged;
            
            public event EmpresaAnoRowChangeEventHandler EmpresaAnoRowChanging;
            
            public event EmpresaAnoRowChangeEventHandler EmpresaAnoRowDeleted;
            
            public event EmpresaAnoRowChangeEventHandler EmpresaAnoRowDeleting;
            
            public void AddEmpresaAnoRow(EmpresaAnoRow row) {
                this.Rows.Add(row);
            }
            
            public EmpresaAnoRow AddEmpresaAnoRow(System.Byte idSistema, string idCodEmpresa, short Ano, string Logo, int Rut, string Digito) {
                EmpresaAnoRow rowEmpresaAnoRow = ((EmpresaAnoRow)(this.NewRow()));
                rowEmpresaAnoRow.ItemArray = new object[] {
                        idSistema,
                        idCodEmpresa,
                        Ano,
                        Logo,
                        Rut,
                        Digito};
                this.Rows.Add(rowEmpresaAnoRow);
                return rowEmpresaAnoRow;
            }
            
            public EmpresaAnoRow FindByidSistemaidCodEmpresaAno(System.Byte idSistema, string idCodEmpresa, short Ano) {
                return ((EmpresaAnoRow)(this.Rows.Find(new object[] {
                            idSistema,
                            idCodEmpresa,
                            Ano})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                EmpresaAnoDataTable cln = ((EmpresaAnoDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new EmpresaAnoDataTable();
            }
            
            internal void InitVars() {
                this.columnidSistema = this.Columns["idSistema"];
                this.columnidCodEmpresa = this.Columns["idCodEmpresa"];
                this.columnAno = this.Columns["Ano"];
                this.columnLogo = this.Columns["Logo"];
                this.columnRut = this.Columns["Rut"];
                this.columnDigito = this.Columns["Digito"];
            }
            
            private void InitClass() {
                this.columnidSistema = new DataColumn("idSistema", typeof(System.Byte), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidSistema);
                this.columnidCodEmpresa = new DataColumn("idCodEmpresa", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidCodEmpresa);
                this.columnAno = new DataColumn("Ano", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAno);
                this.columnLogo = new DataColumn("Logo", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnLogo);
                this.columnRut = new DataColumn("Rut", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRut);
                this.columnDigito = new DataColumn("Digito", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDigito);
                this.Constraints.Add(new UniqueConstraint("DSEmpresaAnoKey1", new DataColumn[] {
                                this.columnidSistema,
                                this.columnidCodEmpresa,
                                this.columnAno}, true));
                this.columnidSistema.AllowDBNull = false;
                this.columnidCodEmpresa.AllowDBNull = false;
                this.columnAno.AllowDBNull = false;
                this.columnLogo.AllowDBNull = false;
            }
            
            public EmpresaAnoRow NewEmpresaAnoRow() {
                return ((EmpresaAnoRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new EmpresaAnoRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EmpresaAnoRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EmpresaAnoRowChanged != null)) {
                    this.EmpresaAnoRowChanged(this, new EmpresaAnoRowChangeEvent(((EmpresaAnoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EmpresaAnoRowChanging != null)) {
                    this.EmpresaAnoRowChanging(this, new EmpresaAnoRowChangeEvent(((EmpresaAnoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EmpresaAnoRowDeleted != null)) {
                    this.EmpresaAnoRowDeleted(this, new EmpresaAnoRowChangeEvent(((EmpresaAnoRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EmpresaAnoRowDeleting != null)) {
                    this.EmpresaAnoRowDeleting(this, new EmpresaAnoRowChangeEvent(((EmpresaAnoRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEmpresaAnoRow(EmpresaAnoRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EmpresaAnoRow : DataRow {
            
            private EmpresaAnoDataTable tableEmpresaAno;
            
            internal EmpresaAnoRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableEmpresaAno = ((EmpresaAnoDataTable)(this.Table));
            }
            
            public System.Byte idSistema {
                get {
                    return ((System.Byte)(this[this.tableEmpresaAno.idSistemaColumn]));
                }
                set {
                    this[this.tableEmpresaAno.idSistemaColumn] = value;
                }
            }
            
            public string idCodEmpresa {
                get {
                    return ((string)(this[this.tableEmpresaAno.idCodEmpresaColumn]));
                }
                set {
                    this[this.tableEmpresaAno.idCodEmpresaColumn] = value;
                }
            }
            
            public short Ano {
                get {
                    return ((short)(this[this.tableEmpresaAno.AnoColumn]));
                }
                set {
                    this[this.tableEmpresaAno.AnoColumn] = value;
                }
            }
            
            public string Logo {
                get {
                    return ((string)(this[this.tableEmpresaAno.LogoColumn]));
                }
                set {
                    this[this.tableEmpresaAno.LogoColumn] = value;
                }
            }
            
            public int Rut {
                get {
                    try {
                        return ((int)(this[this.tableEmpresaAno.RutColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableEmpresaAno.RutColumn] = value;
                }
            }
            
            public string Digito {
                get {
                    try {
                        return ((string)(this[this.tableEmpresaAno.DigitoColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableEmpresaAno.DigitoColumn] = value;
                }
            }
            
            public bool IsRutNull() {
                return this.IsNull(this.tableEmpresaAno.RutColumn);
            }
            
            public void SetRutNull() {
                this[this.tableEmpresaAno.RutColumn] = System.Convert.DBNull;
            }
            
            public bool IsDigitoNull() {
                return this.IsNull(this.tableEmpresaAno.DigitoColumn);
            }
            
            public void SetDigitoNull() {
                this[this.tableEmpresaAno.DigitoColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EmpresaAnoRowChangeEvent : EventArgs {
            
            private EmpresaAnoRow eventRow;
            
            private DataRowAction eventAction;
            
            public EmpresaAnoRowChangeEvent(EmpresaAnoRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EmpresaAnoRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
