//------------------------------------------------------------------------------
// <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 DSCargos : DataSet {
        
        private CargosDataTable tableCargos;
        
        public DSCargos() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSCargos(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["Cargos"] != null)) {
                    this.Tables.Add(new CargosDataTable(ds.Tables["Cargos"]));
                }
                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 CargosDataTable Cargos {
            get {
                return this.tableCargos;
            }
        }
        
        public override DataSet Clone() {
            DSCargos cln = ((DSCargos)(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["Cargos"] != null)) {
                this.Tables.Add(new CargosDataTable(ds.Tables["Cargos"]));
            }
            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.tableCargos = ((CargosDataTable)(this.Tables["Cargos"]));
            if ((this.tableCargos != null)) {
                this.tableCargos.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSCargos";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSCargos.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableCargos = new CargosDataTable();
            this.Tables.Add(this.tableCargos);
        }
        
        private bool ShouldSerializeCargos() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void CargosRowChangeEventHandler(object sender, CargosRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class CargosDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnIdNumero;
            
            private DataColumn columnMes;
            
            private DataColumn columnidCargo;
            
            private DataColumn columnNombre;
            
            private DataColumn columnIdUser;
            
            internal CargosDataTable() : 
                    base("Cargos") {
                this.InitClass();
            }
            
            internal CargosDataTable(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 IdNumeroColumn {
                get {
                    return this.columnIdNumero;
                }
            }
            
            internal DataColumn MesColumn {
                get {
                    return this.columnMes;
                }
            }
            
            internal DataColumn idCargoColumn {
                get {
                    return this.columnidCargo;
                }
            }
            
            internal DataColumn NombreColumn {
                get {
                    return this.columnNombre;
                }
            }
            
            internal DataColumn IdUserColumn {
                get {
                    return this.columnIdUser;
                }
            }
            
            public CargosRow this[int index] {
                get {
                    return ((CargosRow)(this.Rows[index]));
                }
            }
            
            public event CargosRowChangeEventHandler CargosRowChanged;
            
            public event CargosRowChangeEventHandler CargosRowChanging;
            
            public event CargosRowChangeEventHandler CargosRowDeleted;
            
            public event CargosRowChangeEventHandler CargosRowDeleting;
            
            public void AddCargosRow(CargosRow row) {
                this.Rows.Add(row);
            }
            
            public CargosRow AddCargosRow(string IdNumero, short Mes, string idCargo, string Nombre, string IdUser) {
                CargosRow rowCargosRow = ((CargosRow)(this.NewRow()));
                rowCargosRow.ItemArray = new object[] {
                        IdNumero,
                        Mes,
                        idCargo,
                        Nombre,
                        IdUser};
                this.Rows.Add(rowCargosRow);
                return rowCargosRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                CargosDataTable cln = ((CargosDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new CargosDataTable();
            }
            
            internal void InitVars() {
                this.columnIdNumero = this.Columns["IdNumero"];
                this.columnMes = this.Columns["Mes"];
                this.columnidCargo = this.Columns["idCargo"];
                this.columnNombre = this.Columns["Nombre"];
                this.columnIdUser = this.Columns["IdUser"];
            }
            
            private void InitClass() {
                this.columnIdNumero = new DataColumn("IdNumero", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIdNumero);
                this.columnMes = new DataColumn("Mes", typeof(short), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnMes);
                this.columnidCargo = new DataColumn("idCargo", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidCargo);
                this.columnNombre = new DataColumn("Nombre", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnNombre);
                this.columnIdUser = new DataColumn("IdUser", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnIdUser);
                this.columnIdNumero.AllowDBNull = false;
                this.columnMes.AllowDBNull = false;
                this.columnidCargo.AllowDBNull = false;
                this.columnNombre.AllowDBNull = false;
            }
            
            public CargosRow NewCargosRow() {
                return ((CargosRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new CargosRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(CargosRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.CargosRowChanged != null)) {
                    this.CargosRowChanged(this, new CargosRowChangeEvent(((CargosRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.CargosRowChanging != null)) {
                    this.CargosRowChanging(this, new CargosRowChangeEvent(((CargosRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.CargosRowDeleted != null)) {
                    this.CargosRowDeleted(this, new CargosRowChangeEvent(((CargosRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.CargosRowDeleting != null)) {
                    this.CargosRowDeleting(this, new CargosRowChangeEvent(((CargosRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveCargosRow(CargosRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class CargosRow : DataRow {
            
            private CargosDataTable tableCargos;
            
            internal CargosRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableCargos = ((CargosDataTable)(this.Table));
            }
            
            public string IdNumero {
                get {
                    return ((string)(this[this.tableCargos.IdNumeroColumn]));
                }
                set {
                    this[this.tableCargos.IdNumeroColumn] = value;
                }
            }
            
            public short Mes {
                get {
                    return ((short)(this[this.tableCargos.MesColumn]));
                }
                set {
                    this[this.tableCargos.MesColumn] = value;
                }
            }
            
            public string idCargo {
                get {
                    return ((string)(this[this.tableCargos.idCargoColumn]));
                }
                set {
                    this[this.tableCargos.idCargoColumn] = value;
                }
            }
            
            public string Nombre {
                get {
                    return ((string)(this[this.tableCargos.NombreColumn]));
                }
                set {
                    this[this.tableCargos.NombreColumn] = value;
                }
            }
            
            public string IdUser {
                get {
                    try {
                        return ((string)(this[this.tableCargos.IdUserColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableCargos.IdUserColumn] = value;
                }
            }
            
            public bool IsIdUserNull() {
                return this.IsNull(this.tableCargos.IdUserColumn);
            }
            
            public void SetIdUserNull() {
                this[this.tableCargos.IdUserColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class CargosRowChangeEvent : EventArgs {
            
            private CargosRow eventRow;
            
            private DataRowAction eventAction;
            
            public CargosRowChangeEvent(CargosRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public CargosRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
