//------------------------------------------------------------------------------
// <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 DSIsapre : DataSet {
        
        private IsapreDataTable tableIsapre;
        
        public DSIsapre() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSIsapre(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["Isapre"] != null)) {
                    this.Tables.Add(new IsapreDataTable(ds.Tables["Isapre"]));
                }
                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 IsapreDataTable Isapre {
            get {
                return this.tableIsapre;
            }
        }
        
        public override DataSet Clone() {
            DSIsapre cln = ((DSIsapre)(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["Isapre"] != null)) {
                this.Tables.Add(new IsapreDataTable(ds.Tables["Isapre"]));
            }
            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.tableIsapre = ((IsapreDataTable)(this.Tables["Isapre"]));
            if ((this.tableIsapre != null)) {
                this.tableIsapre.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSIsapre";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSIsapre.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableIsapre = new IsapreDataTable();
            this.Tables.Add(this.tableIsapre);
        }
        
        private bool ShouldSerializeIsapre() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void IsapreRowChangeEventHandler(object sender, IsapreRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class IsapreDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnMes;
            
            private DataColumn columnIdIsapre;
            
            private DataColumn columnNombre;
            
            private DataColumn columnAbreviado;
            
            private DataColumn columnFactorCotizacion;
            
            private DataColumn columnFonasa;
            
            private DataColumn columnCodigoInternet;
            
            private DataColumn columnRut;
            
            private DataColumn columnDV;
            
            private DataColumn columnIdUser;
            
            internal IsapreDataTable() : 
                    base("Isapre") {
                this.InitClass();
            }
            
            internal IsapreDataTable(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 IdIsapreColumn {
                get {
                    return this.columnIdIsapre;
                }
            }
            
            internal DataColumn NombreColumn {
                get {
                    return this.columnNombre;
                }
            }
            
            internal DataColumn AbreviadoColumn {
                get {
                    return this.columnAbreviado;
                }
            }
            
            internal DataColumn FactorCotizacionColumn {
                get {
                    return this.columnFactorCotizacion;
                }
            }
            
            internal DataColumn FonasaColumn {
                get {
                    return this.columnFonasa;
                }
            }
            
            internal DataColumn CodigoInternetColumn {
                get {
                    return this.columnCodigoInternet;
                }
            }
            
            internal DataColumn RutColumn {
                get {
                    return this.columnRut;
                }
            }
            
            internal DataColumn DVColumn {
                get {
                    return this.columnDV;
                }
            }
            
            internal DataColumn IdUserColumn {
                get {
                    return this.columnIdUser;
                }
            }
            
            public IsapreRow this[int index] {
                get {
                    return ((IsapreRow)(this.Rows[index]));
                }
            }
            
            public event IsapreRowChangeEventHandler IsapreRowChanged;
            
            public event IsapreRowChangeEventHandler IsapreRowChanging;
            
            public event IsapreRowChangeEventHandler IsapreRowDeleted;
            
            public event IsapreRowChangeEventHandler IsapreRowDeleting;
            
            public void AddIsapreRow(IsapreRow row) {
                this.Rows.Add(row);
            }
            
            public IsapreRow AddIsapreRow(short Mes, string IdIsapre, string Nombre, string Abreviado, System.Double FactorCotizacion, bool Fonasa, string CodigoInternet, int Rut, string DV, string IdUser) {
                IsapreRow rowIsapreRow = ((IsapreRow)(this.NewRow()));
                rowIsapreRow.ItemArray = new object[] {
                        Mes,
                        IdIsapre,
                        Nombre,
                        Abreviado,
                        FactorCotizacion,
                        Fonasa,
                        CodigoInternet,
                        Rut,
                        DV,
                        IdUser};
                this.Rows.Add(rowIsapreRow);
                return rowIsapreRow;
            }
            
            public IsapreRow FindByMesIdIsapre(short Mes, string IdIsapre) {
                return ((IsapreRow)(this.Rows.Find(new object[] {
                            Mes,
                            IdIsapre})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                IsapreDataTable cln = ((IsapreDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new IsapreDataTable();
            }
            
            internal void InitVars() {
                this.columnMes = this.Columns["Mes"];
                this.columnIdIsapre = this.Columns["IdIsapre"];
                this.columnNombre = this.Columns["Nombre"];
                this.columnAbreviado = this.Columns["Abreviado"];
                this.columnFactorCotizacion = this.Columns["FactorCotizacion"];
                this.columnFonasa = this.Columns["Fonasa"];
                this.columnCodigoInternet = this.Columns["CodigoInternet"];
                this.columnRut = this.Columns["Rut"];
                this.columnDV = this.Columns["DV"];
                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.columnIdIsapre = new DataColumn("IdIsapre", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIdIsapre);
                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.columnFactorCotizacion = new DataColumn("FactorCotizacion", typeof(System.Double), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnFactorCotizacion);
                this.columnFonasa = new DataColumn("Fonasa", typeof(bool), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnFonasa);
                this.columnCodigoInternet = new DataColumn("CodigoInternet", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnCodigoInternet);
                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.columnIdUser = new DataColumn("IdUser", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIdUser);
                this.Constraints.Add(new UniqueConstraint("DSIsapreKey1", new DataColumn[] {
                                this.columnMes,
                                this.columnIdIsapre}, true));
                this.columnMes.AllowDBNull = false;
                this.columnIdIsapre.AllowDBNull = false;
                this.columnNombre.AllowDBNull = false;
                this.columnAbreviado.AllowDBNull = false;
                this.columnFactorCotizacion.AllowDBNull = false;
                this.columnFonasa.AllowDBNull = false;
            }
            
            public IsapreRow NewIsapreRow() {
                return ((IsapreRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new IsapreRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(IsapreRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.IsapreRowChanged != null)) {
                    this.IsapreRowChanged(this, new IsapreRowChangeEvent(((IsapreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.IsapreRowChanging != null)) {
                    this.IsapreRowChanging(this, new IsapreRowChangeEvent(((IsapreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.IsapreRowDeleted != null)) {
                    this.IsapreRowDeleted(this, new IsapreRowChangeEvent(((IsapreRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.IsapreRowDeleting != null)) {
                    this.IsapreRowDeleting(this, new IsapreRowChangeEvent(((IsapreRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveIsapreRow(IsapreRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class IsapreRow : DataRow {
            
            private IsapreDataTable tableIsapre;
            
            internal IsapreRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableIsapre = ((IsapreDataTable)(this.Table));
            }
            
            public short Mes {
                get {
                    return ((short)(this[this.tableIsapre.MesColumn]));
                }
                set {
                    this[this.tableIsapre.MesColumn] = value;
                }
            }
            
            public string IdIsapre {
                get {
                    return ((string)(this[this.tableIsapre.IdIsapreColumn]));
                }
                set {
                    this[this.tableIsapre.IdIsapreColumn] = value;
                }
            }
            
            public string Nombre {
                get {
                    return ((string)(this[this.tableIsapre.NombreColumn]));
                }
                set {
                    this[this.tableIsapre.NombreColumn] = value;
                }
            }
            
            public string Abreviado {
                get {
                    return ((string)(this[this.tableIsapre.AbreviadoColumn]));
                }
                set {
                    this[this.tableIsapre.AbreviadoColumn] = value;
                }
            }
            
            public System.Double FactorCotizacion {
                get {
                    return ((System.Double)(this[this.tableIsapre.FactorCotizacionColumn]));
                }
                set {
                    this[this.tableIsapre.FactorCotizacionColumn] = value;
                }
            }
            
            public bool Fonasa {
                get {
                    return ((bool)(this[this.tableIsapre.FonasaColumn]));
                }
                set {
                    this[this.tableIsapre.FonasaColumn] = value;
                }
            }
            
            public string CodigoInternet {
                get {
                    try {
                        return ((string)(this[this.tableIsapre.CodigoInternetColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableIsapre.CodigoInternetColumn] = value;
                }
            }
            
            public int Rut {
                get {
                    try {
                        return ((int)(this[this.tableIsapre.RutColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableIsapre.RutColumn] = value;
                }
            }
            
            public string DV {
                get {
                    try {
                        return ((string)(this[this.tableIsapre.DVColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableIsapre.DVColumn] = value;
                }
            }
            
            public string IdUser {
                get {
                    try {
                        return ((string)(this[this.tableIsapre.IdUserColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableIsapre.IdUserColumn] = value;
                }
            }
            
            public bool IsCodigoInternetNull() {
                return this.IsNull(this.tableIsapre.CodigoInternetColumn);
            }
            
            public void SetCodigoInternetNull() {
                this[this.tableIsapre.CodigoInternetColumn] = System.Convert.DBNull;
            }
            
            public bool IsRutNull() {
                return this.IsNull(this.tableIsapre.RutColumn);
            }
            
            public void SetRutNull() {
                this[this.tableIsapre.RutColumn] = System.Convert.DBNull;
            }
            
            public bool IsDVNull() {
                return this.IsNull(this.tableIsapre.DVColumn);
            }
            
            public void SetDVNull() {
                this[this.tableIsapre.DVColumn] = System.Convert.DBNull;
            }
            
            public bool IsIdUserNull() {
                return this.IsNull(this.tableIsapre.IdUserColumn);
            }
            
            public void SetIdUserNull() {
                this[this.tableIsapre.IdUserColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class IsapreRowChangeEvent : EventArgs {
            
            private IsapreRow eventRow;
            
            private DataRowAction eventAction;
            
            public IsapreRowChangeEvent(IsapreRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public IsapreRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
