//------------------------------------------------------------------------------
// <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 DSModuloWeb : DataSet {
        
        private ModuloWebDataTable tableModuloWeb;
        
        public DSModuloWeb() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSModuloWeb(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["ModuloWeb"] != null)) {
                    this.Tables.Add(new ModuloWebDataTable(ds.Tables["ModuloWeb"]));
                }
                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 ModuloWebDataTable ModuloWeb {
            get {
                return this.tableModuloWeb;
            }
        }
        
        public override DataSet Clone() {
            DSModuloWeb cln = ((DSModuloWeb)(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["ModuloWeb"] != null)) {
                this.Tables.Add(new ModuloWebDataTable(ds.Tables["ModuloWeb"]));
            }
            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.tableModuloWeb = ((ModuloWebDataTable)(this.Tables["ModuloWeb"]));
            if ((this.tableModuloWeb != null)) {
                this.tableModuloWeb.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSModuloWeb";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSModuloWeb.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableModuloWeb = new ModuloWebDataTable();
            this.Tables.Add(this.tableModuloWeb);
        }
        
        private bool ShouldSerializeModuloWeb() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void ModuloWebRowChangeEventHandler(object sender, ModuloWebRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuloWebDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnidModuloWeb;
            
            private DataColumn columnidSistema;
            
            private DataColumn columnLink;
            
            private DataColumn columnNombreDisplay;
            
            private DataColumn columnNivel;
            
            private DataColumn columnidNivelAnterior;
            
            private DataColumn columnEnableInAdmin;
            
            private DataColumn columnEnableInUser;
            
            internal ModuloWebDataTable() : 
                    base("ModuloWeb") {
                this.InitClass();
            }
            
            internal ModuloWebDataTable(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 idModuloWebColumn {
                get {
                    return this.columnidModuloWeb;
                }
            }
            
            internal DataColumn idSistemaColumn {
                get {
                    return this.columnidSistema;
                }
            }
            
            internal DataColumn LinkColumn {
                get {
                    return this.columnLink;
                }
            }
            
            internal DataColumn NombreDisplayColumn {
                get {
                    return this.columnNombreDisplay;
                }
            }
            
            internal DataColumn NivelColumn {
                get {
                    return this.columnNivel;
                }
            }
            
            internal DataColumn idNivelAnteriorColumn {
                get {
                    return this.columnidNivelAnterior;
                }
            }
            
            internal DataColumn EnableInAdminColumn {
                get {
                    return this.columnEnableInAdmin;
                }
            }
            
            internal DataColumn EnableInUserColumn {
                get {
                    return this.columnEnableInUser;
                }
            }
            
            public ModuloWebRow this[int index] {
                get {
                    return ((ModuloWebRow)(this.Rows[index]));
                }
            }
            
            public event ModuloWebRowChangeEventHandler ModuloWebRowChanged;
            
            public event ModuloWebRowChangeEventHandler ModuloWebRowChanging;
            
            public event ModuloWebRowChangeEventHandler ModuloWebRowDeleted;
            
            public event ModuloWebRowChangeEventHandler ModuloWebRowDeleting;
            
            public void AddModuloWebRow(ModuloWebRow row) {
                this.Rows.Add(row);
            }
            
            public ModuloWebRow AddModuloWebRow(int idSistema, string Link, string NombreDisplay, int Nivel, int idNivelAnterior, bool EnableInAdmin, bool EnableInUser) {
                ModuloWebRow rowModuloWebRow = ((ModuloWebRow)(this.NewRow()));
                rowModuloWebRow.ItemArray = new object[] {
                        null,
                        idSistema,
                        Link,
                        NombreDisplay,
                        Nivel,
                        idNivelAnterior,
                        EnableInAdmin,
                        EnableInUser};
                this.Rows.Add(rowModuloWebRow);
                return rowModuloWebRow;
            }
            
            public ModuloWebRow FindByidModuloWeb(int idModuloWeb) {
                return ((ModuloWebRow)(this.Rows.Find(new object[] {
                            idModuloWeb})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ModuloWebDataTable cln = ((ModuloWebDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ModuloWebDataTable();
            }
            
            internal void InitVars() {
                this.columnidModuloWeb = this.Columns["idModuloWeb"];
                this.columnidSistema = this.Columns["idSistema"];
                this.columnLink = this.Columns["Link"];
                this.columnNombreDisplay = this.Columns["NombreDisplay"];
                this.columnNivel = this.Columns["Nivel"];
                this.columnidNivelAnterior = this.Columns["idNivelAnterior"];
                this.columnEnableInAdmin = this.Columns["EnableInAdmin"];
                this.columnEnableInUser = this.Columns["EnableInUser"];
            }
            
            private void InitClass() {
                this.columnidModuloWeb = new DataColumn("idModuloWeb", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidModuloWeb);
                this.columnidSistema = new DataColumn("idSistema", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidSistema);
                this.columnLink = new DataColumn("Link", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnLink);
                this.columnNombreDisplay = new DataColumn("NombreDisplay", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnNombreDisplay);
                this.columnNivel = new DataColumn("Nivel", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnNivel);
                this.columnidNivelAnterior = new DataColumn("idNivelAnterior", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidNivelAnterior);
                this.columnEnableInAdmin = new DataColumn("EnableInAdmin", typeof(bool), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEnableInAdmin);
                this.columnEnableInUser = new DataColumn("EnableInUser", typeof(bool), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnEnableInUser);
                this.Constraints.Add(new UniqueConstraint("DSModuloWebKey1", new DataColumn[] {
                                this.columnidModuloWeb}, true));
                this.columnidModuloWeb.AutoIncrement = true;
                this.columnidModuloWeb.AllowDBNull = false;
                this.columnidModuloWeb.ReadOnly = true;
                this.columnidModuloWeb.Unique = true;
                this.columnidSistema.AllowDBNull = false;
                this.columnNombreDisplay.AllowDBNull = false;
                this.columnNivel.AllowDBNull = false;
            }
            
            public ModuloWebRow NewModuloWebRow() {
                return ((ModuloWebRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ModuloWebRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ModuloWebRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ModuloWebRowChanged != null)) {
                    this.ModuloWebRowChanged(this, new ModuloWebRowChangeEvent(((ModuloWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ModuloWebRowChanging != null)) {
                    this.ModuloWebRowChanging(this, new ModuloWebRowChangeEvent(((ModuloWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ModuloWebRowDeleted != null)) {
                    this.ModuloWebRowDeleted(this, new ModuloWebRowChangeEvent(((ModuloWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ModuloWebRowDeleting != null)) {
                    this.ModuloWebRowDeleting(this, new ModuloWebRowChangeEvent(((ModuloWebRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveModuloWebRow(ModuloWebRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuloWebRow : DataRow {
            
            private ModuloWebDataTable tableModuloWeb;
            
            internal ModuloWebRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableModuloWeb = ((ModuloWebDataTable)(this.Table));
            }
            
            public int idModuloWeb {
                get {
                    return ((int)(this[this.tableModuloWeb.idModuloWebColumn]));
                }
                set {
                    this[this.tableModuloWeb.idModuloWebColumn] = value;
                }
            }
            
            public int idSistema {
                get {
                    return ((int)(this[this.tableModuloWeb.idSistemaColumn]));
                }
                set {
                    this[this.tableModuloWeb.idSistemaColumn] = value;
                }
            }
            
            public string Link {
                get {
                    try {
                        return ((string)(this[this.tableModuloWeb.LinkColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuloWeb.LinkColumn] = value;
                }
            }
            
            public string NombreDisplay {
                get {
                    return ((string)(this[this.tableModuloWeb.NombreDisplayColumn]));
                }
                set {
                    this[this.tableModuloWeb.NombreDisplayColumn] = value;
                }
            }
            
            public int Nivel {
                get {
                    return ((int)(this[this.tableModuloWeb.NivelColumn]));
                }
                set {
                    this[this.tableModuloWeb.NivelColumn] = value;
                }
            }
            
            public int idNivelAnterior {
                get {
                    try {
                        return ((int)(this[this.tableModuloWeb.idNivelAnteriorColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuloWeb.idNivelAnteriorColumn] = value;
                }
            }
            
            public bool EnableInAdmin {
                get {
                    try {
                        return ((bool)(this[this.tableModuloWeb.EnableInAdminColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuloWeb.EnableInAdminColumn] = value;
                }
            }
            
            public bool EnableInUser {
                get {
                    try {
                        return ((bool)(this[this.tableModuloWeb.EnableInUserColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("No se puede obtener el valor porque es DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuloWeb.EnableInUserColumn] = value;
                }
            }
            
            public bool IsLinkNull() {
                return this.IsNull(this.tableModuloWeb.LinkColumn);
            }
            
            public void SetLinkNull() {
                this[this.tableModuloWeb.LinkColumn] = System.Convert.DBNull;
            }
            
            public bool IsidNivelAnteriorNull() {
                return this.IsNull(this.tableModuloWeb.idNivelAnteriorColumn);
            }
            
            public void SetidNivelAnteriorNull() {
                this[this.tableModuloWeb.idNivelAnteriorColumn] = System.Convert.DBNull;
            }
            
            public bool IsEnableInAdminNull() {
                return this.IsNull(this.tableModuloWeb.EnableInAdminColumn);
            }
            
            public void SetEnableInAdminNull() {
                this[this.tableModuloWeb.EnableInAdminColumn] = System.Convert.DBNull;
            }
            
            public bool IsEnableInUserNull() {
                return this.IsNull(this.tableModuloWeb.EnableInUserColumn);
            }
            
            public void SetEnableInUserNull() {
                this[this.tableModuloWeb.EnableInUserColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuloWebRowChangeEvent : EventArgs {
            
            private ModuloWebRow eventRow;
            
            private DataRowAction eventAction;
            
            public ModuloWebRowChangeEvent(ModuloWebRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ModuloWebRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
