//------------------------------------------------------------------------------
// <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 Remuneraciones.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 DSAfp : DataSet {
        
        private AfpDataTable tableAfp;
        
        public DSAfp() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSAfp(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["Afp"] != null)) {
                    this.Tables.Add(new AfpDataTable(ds.Tables["Afp"]));
                }
                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 AfpDataTable Afp {
            get {
                return this.tableAfp;
            }
        }
        
        public override DataSet Clone() {
            DSAfp cln = ((DSAfp)(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["Afp"] != null)) {
                this.Tables.Add(new AfpDataTable(ds.Tables["Afp"]));
            }
            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.tableAfp = ((AfpDataTable)(this.Tables["Afp"]));
            if ((this.tableAfp != null)) {
                this.tableAfp.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSAfp";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSAfp.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableAfp = new AfpDataTable();
            this.Tables.Add(this.tableAfp);
        }
        
        private bool ShouldSerializeAfp() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void AfpRowChangeEventHandler(object sender, AfpRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class AfpDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnMes;
            
            private DataColumn columnidAfp;
            
            private DataColumn columnNombre;
            
            private DataColumn columnAbreviado;
            
            private DataColumn columnDependiente;
            
            private DataColumn columnJubilado;
            
            private DataColumn columnIndependiente;
            
            private DataColumn columnTipoPrevision;
            
            private DataColumn columnRut;
            
            private DataColumn columnDv;
            
            private DataColumn columnCodigoInternet;
            
            private DataColumn columnIdUser;
            
            internal AfpDataTable() : 
                    base("Afp") {
                this.InitClass();
            }
            
            internal AfpDataTable(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 MesColumn {
                get {
                    return this.columnMes;
                }
            }
            
            internal DataColumn idAfpColumn {
                get {
                    return this.columnidAfp;
                }
            }
            
            internal DataColumn NombreColumn {
                get {
                    return this.columnNombre;
                }
            }
            
            internal DataColumn AbreviadoColumn {
                get {
                    return this.columnAbreviado;
                }
            }
            
            internal DataColumn DependienteColumn {
                get {
                    return this.columnDependiente;
                }
            }
            
            internal DataColumn JubiladoColumn {
                get {
                    return this.columnJubilado;
                }
            }
            
            internal DataColumn IndependienteColumn {
                get {
                    return this.columnIndependiente;
                }
            }
            
            internal DataColumn TipoPrevisionColumn {
                get {
                    return this.columnTipoPrevision;
                }
            }
            
            internal DataColumn RutColumn {
                get {
                    return this.columnRut;
                }
            }
            
            internal DataColumn DvColumn {
                get {
                    return this.columnDv;
                }
            }
            
            internal DataColumn CodigoInternetColumn {
                get {
                    return this.columnCodigoInternet;
                }
            }
            
            internal DataColumn IdUserColumn {
                get {
                    return this.columnIdUser;
                }
            }
            
            public AfpRow this[int index] {
                get {
                    return ((AfpRow)(this.Rows[index]));
                }
            }
            
            public event AfpRowChangeEventHandler AfpRowChanged;
            
            public event AfpRowChangeEventHandler AfpRowChanging;
            
            public event AfpRowChangeEventHandler AfpRowDeleted;
            
            public event AfpRowChangeEventHandler AfpRowDeleting;
            
            public void AddAfpRow(AfpRow row) {
                this.Rows.Add(row);
            }
            
            public AfpRow AddAfpRow(short Mes, string idAfp, string Nombre, string Abreviado, System.Double Dependiente, System.Double Jubilado, System.Double Independiente, short TipoPrevision, int Rut, string Dv, string CodigoInternet, string IdUser) {
                AfpRow rowAfpRow = ((AfpRow)(this.NewRow()));
                rowAfpRow.ItemArray = new object[] {
                        Mes,
                        idAfp,
                        Nombre,
                        Abreviado,
                        Dependiente,
                        Jubilado,
                        Independiente,
                        TipoPrevision,
                        Rut,
                        Dv,
                        CodigoInternet,
                        IdUser};
                this.Rows.Add(rowAfpRow);
                return rowAfpRow;
            }
            
            public AfpRow FindByMesidAfp(short Mes, string idAfp) {
                return ((AfpRow)(this.Rows.Find(new object[] {
                            Mes,
                            idAfp})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                AfpDataTable cln = ((AfpDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new AfpDataTable();
            }
            
            internal void InitVars() {
                this.columnMes = this.Columns["Mes"];
                this.columnidAfp = this.Columns["idAfp"];
                this.columnNombre = this.Columns["Nombre"];
                this.columnAbreviado = this.Columns["Abreviado"];
                this.columnDependiente = this.Columns["Dependiente"];
                this.columnJubilado = this.Columns["Jubilado"];
                this.columnIndependiente = this.Columns["Independiente"];
                this.columnTipoPrevision = this.Columns["TipoPrevision"];
                this.columnRut = this.Columns["Rut"];
                this.columnDv = this.Columns["Dv"];
                this.columnCodigoInternet = this.Columns["CodigoInternet"];
                this.columnIdUser = this.Columns["IdUser"];
            }
            
            private void InitClass() {
                this.columnMes = new DataColumn("Mes", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnMes);
                this.columnidAfp = new DataColumn("idAfp", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidAfp);
                this.columnNombre = new DataColumn("Nombre", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnNombre);
                this.columnAbreviado = new DataColumn("Abreviado", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnAbreviado);
                this.columnDependiente = new DataColumn("Dependiente", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDependiente);
                this.columnJubilado = new DataColumn("Jubilado", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnJubilado);
                this.columnIndependiente = new DataColumn("Independiente", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIndependiente);
                this.columnTipoPrevision = new DataColumn("TipoPrevision", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTipoPrevision);
                this.columnRut = new DataColumn("Rut", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnRut);
                this.columnDv = new DataColumn("Dv", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnDv);
                this.columnCodigoInternet = new DataColumn("CodigoInternet", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCodigoInternet);
                this.columnIdUser = new DataColumn("IdUser", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIdUser);
                this.Constraints.Add(new UniqueConstraint("DSAfpKey1", new DataColumn[] {
                                this.columnMes,
                                this.columnidAfp}, true));
                this.columnMes.AllowDBNull = false;
                this.columnidAfp.AllowDBNull = false;
                this.columnNombre.AllowDBNull = false;
                this.columnAbreviado.AllowDBNull = false;
                this.columnDependiente.AllowDBNull = false;
                this.columnTipoPrevision.AllowDBNull = false;
            }
            
            public AfpRow NewAfpRow() {
                return ((AfpRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new AfpRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(AfpRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.AfpRowChanged != null)) {
                    this.AfpRowChanged(this, new AfpRowChangeEvent(((AfpRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.AfpRowChanging != null)) {
                    this.AfpRowChanging(this, new AfpRowChangeEvent(((AfpRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.AfpRowDeleted != null)) {
                    this.AfpRowDeleted(this, new AfpRowChangeEvent(((AfpRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.AfpRowDeleting != null)) {
                    this.AfpRowDeleting(this, new AfpRowChangeEvent(((AfpRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveAfpRow(AfpRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class AfpRow : DataRow {
            
            private AfpDataTable tableAfp;
            
            internal AfpRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableAfp = ((AfpDataTable)(this.Table));
            }
            
            public short Mes {
                get {
                    return ((short)(this[this.tableAfp.MesColumn]));
                }
                set {
                    this[this.tableAfp.MesColumn] = value;
                }
            }
            
            public string idAfp {
                get {
                    return ((string)(this[this.tableAfp.idAfpColumn]));
                }
                set {
                    this[this.tableAfp.idAfpColumn] = value;
                }
            }
            
            public string Nombre {
                get {
                    return ((string)(this[this.tableAfp.NombreColumn]));
                }
                set {
                    this[this.tableAfp.NombreColumn] = value;
                }
            }
            
            public string Abreviado {
                get {
                    return ((string)(this[this.tableAfp.AbreviadoColumn]));
                }
                set {
                    this[this.tableAfp.AbreviadoColumn] = value;
                }
            }
            
            public System.Double Dependiente {
                get {
                    return ((System.Double)(this[this.tableAfp.DependienteColumn]));
                }
                set {
                    this[this.tableAfp.DependienteColumn] = value;
                }
            }
            
            public System.Double Jubilado {
                get {
                    try {
                        return ((System.Double)(this[this.tableAfp.JubiladoColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.JubiladoColumn] = value;
                }
            }
            
            public System.Double Independiente {
                get {
                    try {
                        return ((System.Double)(this[this.tableAfp.IndependienteColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.IndependienteColumn] = value;
                }
            }
            
            public short TipoPrevision {
                get {
                    return ((short)(this[this.tableAfp.TipoPrevisionColumn]));
                }
                set {
                    this[this.tableAfp.TipoPrevisionColumn] = value;
                }
            }
            
            public int Rut {
                get {
                    try {
                        return ((int)(this[this.tableAfp.RutColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.RutColumn] = value;
                }
            }
            
            public string Dv {
                get {
                    try {
                        return ((string)(this[this.tableAfp.DvColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.DvColumn] = value;
                }
            }
            
            public string CodigoInternet {
                get {
                    try {
                        return ((string)(this[this.tableAfp.CodigoInternetColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.CodigoInternetColumn] = value;
                }
            }
            
            public string IdUser {
                get {
                    try {
                        return ((string)(this[this.tableAfp.IdUserColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableAfp.IdUserColumn] = value;
                }
            }
            
            public bool IsJubiladoNull() {
                return this.IsNull(this.tableAfp.JubiladoColumn);
            }
            
            public void SetJubiladoNull() {
                this[this.tableAfp.JubiladoColumn] = System.Convert.DBNull;
            }
            
            public bool IsIndependienteNull() {
                return this.IsNull(this.tableAfp.IndependienteColumn);
            }
            
            public void SetIndependienteNull() {
                this[this.tableAfp.IndependienteColumn] = System.Convert.DBNull;
            }
            
            public bool IsRutNull() {
                return this.IsNull(this.tableAfp.RutColumn);
            }
            
            public void SetRutNull() {
                this[this.tableAfp.RutColumn] = System.Convert.DBNull;
            }
            
            public bool IsDvNull() {
                return this.IsNull(this.tableAfp.DvColumn);
            }
            
            public void SetDvNull() {
                this[this.tableAfp.DvColumn] = System.Convert.DBNull;
            }
            
            public bool IsCodigoInternetNull() {
                return this.IsNull(this.tableAfp.CodigoInternetColumn);
            }
            
            public void SetCodigoInternetNull() {
                this[this.tableAfp.CodigoInternetColumn] = System.Convert.DBNull;
            }
            
            public bool IsIdUserNull() {
                return this.IsNull(this.tableAfp.IdUserColumn);
            }
            
            public void SetIdUserNull() {
                this[this.tableAfp.IdUserColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class AfpRowChangeEvent : EventArgs {
            
            private AfpRow eventRow;
            
            private DataRowAction eventAction;
            
            public AfpRowChangeEvent(AfpRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public AfpRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
