//------------------------------------------------------------------------------
// <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 DSPermisos : DataSet {
        
        private PermisosWebDataTable tablePermisosWeb;
        
        public DSPermisos() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected DSPermisos(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["PermisosWeb"] != null)) {
                    this.Tables.Add(new PermisosWebDataTable(ds.Tables["PermisosWeb"]));
                }
                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 PermisosWebDataTable PermisosWeb {
            get {
                return this.tablePermisosWeb;
            }
        }
        
        public override DataSet Clone() {
            DSPermisos cln = ((DSPermisos)(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["PermisosWeb"] != null)) {
                this.Tables.Add(new PermisosWebDataTable(ds.Tables["PermisosWeb"]));
            }
            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.tablePermisosWeb = ((PermisosWebDataTable)(this.Tables["PermisosWeb"]));
            if ((this.tablePermisosWeb != null)) {
                this.tablePermisosWeb.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "DSPermisos";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/DSPermisos.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tablePermisosWeb = new PermisosWebDataTable();
            this.Tables.Add(this.tablePermisosWeb);
        }
        
        private bool ShouldSerializePermisosWeb() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void PermisosWebRowChangeEventHandler(object sender, PermisosWebRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class PermisosWebDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnidPermisoWeb;
            
            private DataColumn columnidSucursalWeb;
            
            private DataColumn columnidModuloWeb;
            
            private DataColumn columnidUsuarioWeb;
            
            private DataColumn columnTipoUsuario;
            
            internal PermisosWebDataTable() : 
                    base("PermisosWeb") {
                this.InitClass();
            }
            
            internal PermisosWebDataTable(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 idPermisoWebColumn {
                get {
                    return this.columnidPermisoWeb;
                }
            }
            
            internal DataColumn idSucursalWebColumn {
                get {
                    return this.columnidSucursalWeb;
                }
            }
            
            internal DataColumn idModuloWebColumn {
                get {
                    return this.columnidModuloWeb;
                }
            }
            
            internal DataColumn idUsuarioWebColumn {
                get {
                    return this.columnidUsuarioWeb;
                }
            }
            
            internal DataColumn TipoUsuarioColumn {
                get {
                    return this.columnTipoUsuario;
                }
            }
            
            public PermisosWebRow this[int index] {
                get {
                    return ((PermisosWebRow)(this.Rows[index]));
                }
            }
            
            public event PermisosWebRowChangeEventHandler PermisosWebRowChanged;
            
            public event PermisosWebRowChangeEventHandler PermisosWebRowChanging;
            
            public event PermisosWebRowChangeEventHandler PermisosWebRowDeleted;
            
            public event PermisosWebRowChangeEventHandler PermisosWebRowDeleting;
            
            public void AddPermisosWebRow(PermisosWebRow row) {
                this.Rows.Add(row);
            }
            
            public PermisosWebRow AddPermisosWebRow(int idSucursalWeb, int idModuloWeb, int idUsuarioWeb, int TipoUsuario) {
                PermisosWebRow rowPermisosWebRow = ((PermisosWebRow)(this.NewRow()));
                rowPermisosWebRow.ItemArray = new object[] {
                        null,
                        idSucursalWeb,
                        idModuloWeb,
                        idUsuarioWeb,
                        TipoUsuario};
                this.Rows.Add(rowPermisosWebRow);
                return rowPermisosWebRow;
            }
            
            public PermisosWebRow FindByidPermisoWeb(int idPermisoWeb) {
                return ((PermisosWebRow)(this.Rows.Find(new object[] {
                            idPermisoWeb})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                PermisosWebDataTable cln = ((PermisosWebDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new PermisosWebDataTable();
            }
            
            internal void InitVars() {
                this.columnidPermisoWeb = this.Columns["idPermisoWeb"];
                this.columnidSucursalWeb = this.Columns["idSucursalWeb"];
                this.columnidModuloWeb = this.Columns["idModuloWeb"];
                this.columnidUsuarioWeb = this.Columns["idUsuarioWeb"];
                this.columnTipoUsuario = this.Columns["TipoUsuario"];
            }
            
            private void InitClass() {
                this.columnidPermisoWeb = new DataColumn("idPermisoWeb", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidPermisoWeb);
                this.columnidSucursalWeb = new DataColumn("idSucursalWeb", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidSucursalWeb);
                this.columnidModuloWeb = new DataColumn("idModuloWeb", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidModuloWeb);
                this.columnidUsuarioWeb = new DataColumn("idUsuarioWeb", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnidUsuarioWeb);
                this.columnTipoUsuario = new DataColumn("TipoUsuario", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnTipoUsuario);
                this.Constraints.Add(new UniqueConstraint("DSPermisosKey1", new DataColumn[] {
                                this.columnidPermisoWeb}, true));
                this.columnidPermisoWeb.AutoIncrement = true;
                this.columnidPermisoWeb.AllowDBNull = false;
                this.columnidPermisoWeb.ReadOnly = true;
                this.columnidPermisoWeb.Unique = true;
                this.columnidSucursalWeb.AllowDBNull = false;
                this.columnidModuloWeb.AllowDBNull = false;
                this.columnidUsuarioWeb.AllowDBNull = false;
                this.columnTipoUsuario.AllowDBNull = false;
                this.columnTipoUsuario.DefaultValue = 2;
            }
            
            public PermisosWebRow NewPermisosWebRow() {
                return ((PermisosWebRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new PermisosWebRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(PermisosWebRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.PermisosWebRowChanged != null)) {
                    this.PermisosWebRowChanged(this, new PermisosWebRowChangeEvent(((PermisosWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.PermisosWebRowChanging != null)) {
                    this.PermisosWebRowChanging(this, new PermisosWebRowChangeEvent(((PermisosWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.PermisosWebRowDeleted != null)) {
                    this.PermisosWebRowDeleted(this, new PermisosWebRowChangeEvent(((PermisosWebRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.PermisosWebRowDeleting != null)) {
                    this.PermisosWebRowDeleting(this, new PermisosWebRowChangeEvent(((PermisosWebRow)(e.Row)), e.Action));
                }
            }
            
            public void RemovePermisosWebRow(PermisosWebRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class PermisosWebRow : DataRow {
            
            private PermisosWebDataTable tablePermisosWeb;
            
            internal PermisosWebRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tablePermisosWeb = ((PermisosWebDataTable)(this.Table));
            }
            
            public int idPermisoWeb {
                get {
                    return ((int)(this[this.tablePermisosWeb.idPermisoWebColumn]));
                }
                set {
                    this[this.tablePermisosWeb.idPermisoWebColumn] = value;
                }
            }
            
            public int idSucursalWeb {
                get {
                    return ((int)(this[this.tablePermisosWeb.idSucursalWebColumn]));
                }
                set {
                    this[this.tablePermisosWeb.idSucursalWebColumn] = value;
                }
            }
            
            public int idModuloWeb {
                get {
                    return ((int)(this[this.tablePermisosWeb.idModuloWebColumn]));
                }
                set {
                    this[this.tablePermisosWeb.idModuloWebColumn] = value;
                }
            }
            
            public int idUsuarioWeb {
                get {
                    return ((int)(this[this.tablePermisosWeb.idUsuarioWebColumn]));
                }
                set {
                    this[this.tablePermisosWeb.idUsuarioWebColumn] = value;
                }
            }
            
            public int TipoUsuario {
                get {
                    return ((int)(this[this.tablePermisosWeb.TipoUsuarioColumn]));
                }
                set {
                    this[this.tablePermisosWeb.TipoUsuarioColumn] = value;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class PermisosWebRowChangeEvent : EventArgs {
            
            private PermisosWebRow eventRow;
            
            private DataRowAction eventAction;
            
            public PermisosWebRowChangeEvent(PermisosWebRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public PermisosWebRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
