//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.0.3705.209
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace ASPNET.StarterKit.Portal {
    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 SiteConfiguration : DataSet {
        
        private GlobalDataTable tableGlobal;
        
        private TabDataTable tableTab;
        
        private ModuleDataTable tableModule;
        
        private SettingsDataTable tableSettings;
        
        private SettingDataTable tableSetting;
        
        private ModuleDefinitionDataTable tableModuleDefinition;
        
        private DataRelation relationSettings_Setting;
        
        private DataRelation relationModule_Settings;
        
        private DataRelation relationTab_Module;
        
        public SiteConfiguration() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected SiteConfiguration(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["Global"] != null)) {
                    this.Tables.Add(new GlobalDataTable(ds.Tables["Global"]));
                }
                if ((ds.Tables["Tab"] != null)) {
                    this.Tables.Add(new TabDataTable(ds.Tables["Tab"]));
                }
                if ((ds.Tables["Module"] != null)) {
                    this.Tables.Add(new ModuleDataTable(ds.Tables["Module"]));
                }
                if ((ds.Tables["Settings"] != null)) {
                    this.Tables.Add(new SettingsDataTable(ds.Tables["Settings"]));
                }
                if ((ds.Tables["Setting"] != null)) {
                    this.Tables.Add(new SettingDataTable(ds.Tables["Setting"]));
                }
                if ((ds.Tables["ModuleDefinition"] != null)) {
                    this.Tables.Add(new ModuleDefinitionDataTable(ds.Tables["ModuleDefinition"]));
                }
                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 GlobalDataTable Global {
            get {
                return this.tableGlobal;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public TabDataTable Tab {
            get {
                return this.tableTab;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ModuleDataTable Module {
            get {
                return this.tableModule;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SettingsDataTable Settings {
            get {
                return this.tableSettings;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public SettingDataTable Setting {
            get {
                return this.tableSetting;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ModuleDefinitionDataTable ModuleDefinition {
            get {
                return this.tableModuleDefinition;
            }
        }
        
        public override DataSet Clone() {
            SiteConfiguration cln = ((SiteConfiguration)(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["Global"] != null)) {
                this.Tables.Add(new GlobalDataTable(ds.Tables["Global"]));
            }
            if ((ds.Tables["Tab"] != null)) {
                this.Tables.Add(new TabDataTable(ds.Tables["Tab"]));
            }
            if ((ds.Tables["Module"] != null)) {
                this.Tables.Add(new ModuleDataTable(ds.Tables["Module"]));
            }
            if ((ds.Tables["Settings"] != null)) {
                this.Tables.Add(new SettingsDataTable(ds.Tables["Settings"]));
            }
            if ((ds.Tables["Setting"] != null)) {
                this.Tables.Add(new SettingDataTable(ds.Tables["Setting"]));
            }
            if ((ds.Tables["ModuleDefinition"] != null)) {
                this.Tables.Add(new ModuleDefinitionDataTable(ds.Tables["ModuleDefinition"]));
            }
            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.tableGlobal = ((GlobalDataTable)(this.Tables["Global"]));
            if ((this.tableGlobal != null)) {
                this.tableGlobal.InitVars();
            }
            this.tableTab = ((TabDataTable)(this.Tables["Tab"]));
            if ((this.tableTab != null)) {
                this.tableTab.InitVars();
            }
            this.tableModule = ((ModuleDataTable)(this.Tables["Module"]));
            if ((this.tableModule != null)) {
                this.tableModule.InitVars();
            }
            this.tableSettings = ((SettingsDataTable)(this.Tables["Settings"]));
            if ((this.tableSettings != null)) {
                this.tableSettings.InitVars();
            }
            this.tableSetting = ((SettingDataTable)(this.Tables["Setting"]));
            if ((this.tableSetting != null)) {
                this.tableSetting.InitVars();
            }
            this.tableModuleDefinition = ((ModuleDefinitionDataTable)(this.Tables["ModuleDefinition"]));
            if ((this.tableModuleDefinition != null)) {
                this.tableModuleDefinition.InitVars();
            }
            this.relationSettings_Setting = this.Relations["Settings_Setting"];
            this.relationModule_Settings = this.Relations["Module_Settings"];
            this.relationTab_Module = this.Relations["Tab_Module"];
        }
        
        private void InitClass() {
            this.DataSetName = "SiteConfiguration";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/PortalCfg.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = false;
            this.tableGlobal = new GlobalDataTable();
            this.Tables.Add(this.tableGlobal);
            this.tableTab = new TabDataTable();
            this.Tables.Add(this.tableTab);
            this.tableModule = new ModuleDataTable();
            this.Tables.Add(this.tableModule);
            this.tableSettings = new SettingsDataTable();
            this.Tables.Add(this.tableSettings);
            this.tableSetting = new SettingDataTable();
            this.Tables.Add(this.tableSetting);
            this.tableModuleDefinition = new ModuleDefinitionDataTable();
            this.Tables.Add(this.tableModuleDefinition);
            ForeignKeyConstraint fkc;
            fkc = new ForeignKeyConstraint("Tab_Module", new DataColumn[] {
                        this.tableTab.TabIdColumn}, new DataColumn[] {
                        this.tableModule.TabIdColumn});
            this.tableModule.Constraints.Add(fkc);
            fkc.AcceptRejectRule = AcceptRejectRule.None;
            fkc.DeleteRule = Rule.Cascade;
            fkc.UpdateRule = Rule.Cascade;
            fkc = new ForeignKeyConstraint("Module_Settings", new DataColumn[] {
                        this.tableModule.ModuleIdColumn}, new DataColumn[] {
                        this.tableSettings.ModuleIdColumn});
            this.tableSettings.Constraints.Add(fkc);
            fkc.AcceptRejectRule = AcceptRejectRule.None;
            fkc.DeleteRule = Rule.Cascade;
            fkc.UpdateRule = Rule.Cascade;
            fkc = new ForeignKeyConstraint("Settings_Setting", new DataColumn[] {
                        this.tableSettings.Settings_IdColumn}, new DataColumn[] {
                        this.tableSetting.Settings_IdColumn});
            this.tableSetting.Constraints.Add(fkc);
            fkc.AcceptRejectRule = AcceptRejectRule.None;
            fkc.DeleteRule = Rule.Cascade;
            fkc.UpdateRule = Rule.Cascade;
            this.relationSettings_Setting = new DataRelation("Settings_Setting", new DataColumn[] {
                        this.tableSettings.Settings_IdColumn}, new DataColumn[] {
                        this.tableSetting.Settings_IdColumn}, false);
            this.relationSettings_Setting.Nested = true;
            this.Relations.Add(this.relationSettings_Setting);
            this.relationModule_Settings = new DataRelation("Module_Settings", new DataColumn[] {
                        this.tableModule.ModuleIdColumn}, new DataColumn[] {
                        this.tableSettings.ModuleIdColumn}, false);
            this.relationModule_Settings.Nested = true;
            this.Relations.Add(this.relationModule_Settings);
            this.relationTab_Module = new DataRelation("Tab_Module", new DataColumn[] {
                        this.tableTab.TabIdColumn}, new DataColumn[] {
                        this.tableModule.TabIdColumn}, false);
            this.relationTab_Module.Nested = true;
            this.Relations.Add(this.relationTab_Module);
        }
        
        private bool ShouldSerializeGlobal() {
            return false;
        }
        
        private bool ShouldSerializeTab() {
            return false;
        }
        
        private bool ShouldSerializeModule() {
            return false;
        }
        
        private bool ShouldSerializeSettings() {
            return false;
        }
        
        private bool ShouldSerializeSetting() {
            return false;
        }
        
        private bool ShouldSerializeModuleDefinition() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void GlobalRowChangeEventHandler(object sender, GlobalRowChangeEvent e);
        
        public delegate void TabRowChangeEventHandler(object sender, TabRowChangeEvent e);
        
        public delegate void ModuleRowChangeEventHandler(object sender, ModuleRowChangeEvent e);
        
        public delegate void SettingsRowChangeEventHandler(object sender, SettingsRowChangeEvent e);
        
        public delegate void SettingRowChangeEventHandler(object sender, SettingRowChangeEvent e);
        
        public delegate void ModuleDefinitionRowChangeEventHandler(object sender, ModuleDefinitionRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class GlobalDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnPortalId;
            
            private DataColumn columnPortalName;
            
            private DataColumn columnAlwaysShowEditButton;
            
            internal GlobalDataTable() : 
                    base("Global") {
                this.InitClass();
            }
            
            internal GlobalDataTable(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 PortalIdColumn {
                get {
                    return this.columnPortalId;
                }
            }
            
            internal DataColumn PortalNameColumn {
                get {
                    return this.columnPortalName;
                }
            }
            
            internal DataColumn AlwaysShowEditButtonColumn {
                get {
                    return this.columnAlwaysShowEditButton;
                }
            }
            
            public GlobalRow this[int index] {
                get {
                    return ((GlobalRow)(this.Rows[index]));
                }
            }
            
            public event GlobalRowChangeEventHandler GlobalRowChanged;
            
            public event GlobalRowChangeEventHandler GlobalRowChanging;
            
            public event GlobalRowChangeEventHandler GlobalRowDeleted;
            
            public event GlobalRowChangeEventHandler GlobalRowDeleting;
            
            public void AddGlobalRow(GlobalRow row) {
                this.Rows.Add(row);
            }
            
            public GlobalRow AddGlobalRow(int PortalId, string PortalName, bool AlwaysShowEditButton) {
                GlobalRow rowGlobalRow = ((GlobalRow)(this.NewRow()));
                rowGlobalRow.ItemArray = new object[] {
                        PortalId,
                        PortalName,
                        AlwaysShowEditButton};
                this.Rows.Add(rowGlobalRow);
                return rowGlobalRow;
            }
            
            public GlobalRow FindByPortalId(int PortalId) {
                return ((GlobalRow)(this.Rows.Find(new object[] {
                            PortalId})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                GlobalDataTable cln = ((GlobalDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new GlobalDataTable();
            }
            
            internal void InitVars() {
                this.columnPortalId = this.Columns["PortalId"];
                this.columnPortalName = this.Columns["PortalName"];
                this.columnAlwaysShowEditButton = this.Columns["AlwaysShowEditButton"];
            }
            
            private void InitClass() {
                this.columnPortalId = new DataColumn("PortalId", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnPortalId);
                this.columnPortalName = new DataColumn("PortalName", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnPortalName);
                this.columnAlwaysShowEditButton = new DataColumn("AlwaysShowEditButton", typeof(bool), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnAlwaysShowEditButton);
                this.Constraints.Add(new UniqueConstraint("GlobalKey", new DataColumn[] {
                                this.columnPortalId}, true));
                this.columnPortalId.AllowDBNull = false;
                this.columnPortalId.Unique = true;
                this.columnPortalId.Namespace = "";
                this.columnPortalName.Namespace = "";
                this.columnAlwaysShowEditButton.Namespace = "";
            }
            
            public GlobalRow NewGlobalRow() {
                return ((GlobalRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new GlobalRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(GlobalRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.GlobalRowChanged != null)) {
                    this.GlobalRowChanged(this, new GlobalRowChangeEvent(((GlobalRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.GlobalRowChanging != null)) {
                    this.GlobalRowChanging(this, new GlobalRowChangeEvent(((GlobalRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.GlobalRowDeleted != null)) {
                    this.GlobalRowDeleted(this, new GlobalRowChangeEvent(((GlobalRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.GlobalRowDeleting != null)) {
                    this.GlobalRowDeleting(this, new GlobalRowChangeEvent(((GlobalRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveGlobalRow(GlobalRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class GlobalRow : DataRow {
            
            private GlobalDataTable tableGlobal;
            
            internal GlobalRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableGlobal = ((GlobalDataTable)(this.Table));
            }
            
            public int PortalId {
                get {
                    return ((int)(this[this.tableGlobal.PortalIdColumn]));
                }
                set {
                    this[this.tableGlobal.PortalIdColumn] = value;
                }
            }
            
            public string PortalName {
                get {
                    try {
                        return ((string)(this[this.tableGlobal.PortalNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableGlobal.PortalNameColumn] = value;
                }
            }
            
            public bool AlwaysShowEditButton {
                get {
                    try {
                        return ((bool)(this[this.tableGlobal.AlwaysShowEditButtonColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableGlobal.AlwaysShowEditButtonColumn] = value;
                }
            }
            
            public bool IsPortalNameNull() {
                return this.IsNull(this.tableGlobal.PortalNameColumn);
            }
            
            public void SetPortalNameNull() {
                this[this.tableGlobal.PortalNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsAlwaysShowEditButtonNull() {
                return this.IsNull(this.tableGlobal.AlwaysShowEditButtonColumn);
            }
            
            public void SetAlwaysShowEditButtonNull() {
                this[this.tableGlobal.AlwaysShowEditButtonColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class GlobalRowChangeEvent : EventArgs {
            
            private GlobalRow eventRow;
            
            private DataRowAction eventAction;
            
            public GlobalRowChangeEvent(GlobalRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public GlobalRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TabDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnTabId;
            
            private DataColumn columnTabName;
            
            private DataColumn columnAccessRoles;
            
            private DataColumn columnTabOrder;
            
            private DataColumn columnShowMobile;
            
            private DataColumn columnMobileTabName;
            
            internal TabDataTable() : 
                    base("Tab") {
                this.InitClass();
            }
            
            internal TabDataTable(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 TabIdColumn {
                get {
                    return this.columnTabId;
                }
            }
            
            internal DataColumn TabNameColumn {
                get {
                    return this.columnTabName;
                }
            }
            
            internal DataColumn AccessRolesColumn {
                get {
                    return this.columnAccessRoles;
                }
            }
            
            internal DataColumn TabOrderColumn {
                get {
                    return this.columnTabOrder;
                }
            }
            
            internal DataColumn ShowMobileColumn {
                get {
                    return this.columnShowMobile;
                }
            }
            
            internal DataColumn MobileTabNameColumn {
                get {
                    return this.columnMobileTabName;
                }
            }
            
            public TabRow this[int index] {
                get {
                    return ((TabRow)(this.Rows[index]));
                }
            }
            
            public event TabRowChangeEventHandler TabRowChanged;
            
            public event TabRowChangeEventHandler TabRowChanging;
            
            public event TabRowChangeEventHandler TabRowDeleted;
            
            public event TabRowChangeEventHandler TabRowDeleting;
            
            public void AddTabRow(TabRow row) {
                this.Rows.Add(row);
            }
            
            public TabRow AddTabRow(int TabId, string TabName, string AccessRoles, int TabOrder, bool ShowMobile, string MobileTabName) {
                TabRow rowTabRow = ((TabRow)(this.NewRow()));
                rowTabRow.ItemArray = new object[] {
                        TabId,
                        TabName,
                        AccessRoles,
                        TabOrder,
                        ShowMobile,
                        MobileTabName};
                this.Rows.Add(rowTabRow);
                return rowTabRow;
            }
            
            public TabRow FindByTabId(int TabId) {
                return ((TabRow)(this.Rows.Find(new object[] {
                            TabId})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                TabDataTable cln = ((TabDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new TabDataTable();
            }
            
            internal void InitVars() {
                this.columnTabId = this.Columns["TabId"];
                this.columnTabName = this.Columns["TabName"];
                this.columnAccessRoles = this.Columns["AccessRoles"];
                this.columnTabOrder = this.Columns["TabOrder"];
                this.columnShowMobile = this.Columns["ShowMobile"];
                this.columnMobileTabName = this.Columns["MobileTabName"];
            }
            
            private void InitClass() {
                this.columnTabId = new DataColumn("TabId", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnTabId);
                this.columnTabName = new DataColumn("TabName", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnTabName);
                this.columnAccessRoles = new DataColumn("AccessRoles", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnAccessRoles);
                this.columnTabOrder = new DataColumn("TabOrder", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnTabOrder);
                this.columnShowMobile = new DataColumn("ShowMobile", typeof(bool), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnShowMobile);
                this.columnMobileTabName = new DataColumn("MobileTabName", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnMobileTabName);
                this.Constraints.Add(new UniqueConstraint("TabKey", new DataColumn[] {
                                this.columnTabId}, true));
                this.columnTabId.AllowDBNull = false;
                this.columnTabId.Unique = true;
                this.columnTabId.Namespace = "";
                this.columnTabName.Namespace = "";
                this.columnAccessRoles.Namespace = "";
                this.columnTabOrder.Namespace = "";
                this.columnShowMobile.Namespace = "";
                this.columnMobileTabName.Namespace = "";
            }
            
            public TabRow NewTabRow() {
                return ((TabRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new TabRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(TabRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.TabRowChanged != null)) {
                    this.TabRowChanged(this, new TabRowChangeEvent(((TabRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.TabRowChanging != null)) {
                    this.TabRowChanging(this, new TabRowChangeEvent(((TabRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.TabRowDeleted != null)) {
                    this.TabRowDeleted(this, new TabRowChangeEvent(((TabRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.TabRowDeleting != null)) {
                    this.TabRowDeleting(this, new TabRowChangeEvent(((TabRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveTabRow(TabRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TabRow : DataRow {
            
            private TabDataTable tableTab;
            
            internal TabRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableTab = ((TabDataTable)(this.Table));
            }
            
            public int TabId {
                get {
                    return ((int)(this[this.tableTab.TabIdColumn]));
                }
                set {
                    this[this.tableTab.TabIdColumn] = value;
                }
            }
            
            public string TabName {
                get {
                    try {
                        return ((string)(this[this.tableTab.TabNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableTab.TabNameColumn] = value;
                }
            }
            
            public string AccessRoles {
                get {
                    try {
                        return ((string)(this[this.tableTab.AccessRolesColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableTab.AccessRolesColumn] = value;
                }
            }
            
            public int TabOrder {
                get {
                    try {
                        return ((int)(this[this.tableTab.TabOrderColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableTab.TabOrderColumn] = value;
                }
            }
            
            public bool ShowMobile {
                get {
                    try {
                        return ((bool)(this[this.tableTab.ShowMobileColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableTab.ShowMobileColumn] = value;
                }
            }
            
            public string MobileTabName {
                get {
                    try {
                        return ((string)(this[this.tableTab.MobileTabNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableTab.MobileTabNameColumn] = value;
                }
            }
            
            public bool IsTabNameNull() {
                return this.IsNull(this.tableTab.TabNameColumn);
            }
            
            public void SetTabNameNull() {
                this[this.tableTab.TabNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsAccessRolesNull() {
                return this.IsNull(this.tableTab.AccessRolesColumn);
            }
            
            public void SetAccessRolesNull() {
                this[this.tableTab.AccessRolesColumn] = System.Convert.DBNull;
            }
            
            public bool IsTabOrderNull() {
                return this.IsNull(this.tableTab.TabOrderColumn);
            }
            
            public void SetTabOrderNull() {
                this[this.tableTab.TabOrderColumn] = System.Convert.DBNull;
            }
            
            public bool IsShowMobileNull() {
                return this.IsNull(this.tableTab.ShowMobileColumn);
            }
            
            public void SetShowMobileNull() {
                this[this.tableTab.ShowMobileColumn] = System.Convert.DBNull;
            }
            
            public bool IsMobileTabNameNull() {
                return this.IsNull(this.tableTab.MobileTabNameColumn);
            }
            
            public void SetMobileTabNameNull() {
                this[this.tableTab.MobileTabNameColumn] = System.Convert.DBNull;
            }
            
            public ModuleRow[] GetModuleRows() {
                return ((ModuleRow[])(this.GetChildRows(this.Table.ChildRelations["Tab_Module"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class TabRowChangeEvent : EventArgs {
            
            private TabRow eventRow;
            
            private DataRowAction eventAction;
            
            public TabRowChangeEvent(TabRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public TabRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnModuleId;
            
            private DataColumn columnModuleTitle;
            
            private DataColumn columnEditRoles;
            
            private DataColumn columnModuleDefId;
            
            private DataColumn columnPaneName;
            
            private DataColumn columnCacheTimeout;
            
            private DataColumn columnModuleOrder;
            
            private DataColumn columnShowMobile;
            
            private DataColumn columnTabId;
            
            internal ModuleDataTable() : 
                    base("Module") {
                this.InitClass();
            }
            
            internal ModuleDataTable(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 ModuleIdColumn {
                get {
                    return this.columnModuleId;
                }
            }
            
            internal DataColumn ModuleTitleColumn {
                get {
                    return this.columnModuleTitle;
                }
            }
            
            internal DataColumn EditRolesColumn {
                get {
                    return this.columnEditRoles;
                }
            }
            
            internal DataColumn ModuleDefIdColumn {
                get {
                    return this.columnModuleDefId;
                }
            }
            
            internal DataColumn PaneNameColumn {
                get {
                    return this.columnPaneName;
                }
            }
            
            internal DataColumn CacheTimeoutColumn {
                get {
                    return this.columnCacheTimeout;
                }
            }
            
            internal DataColumn ModuleOrderColumn {
                get {
                    return this.columnModuleOrder;
                }
            }
            
            internal DataColumn ShowMobileColumn {
                get {
                    return this.columnShowMobile;
                }
            }
            
            internal DataColumn TabIdColumn {
                get {
                    return this.columnTabId;
                }
            }
            
            public ModuleRow this[int index] {
                get {
                    return ((ModuleRow)(this.Rows[index]));
                }
            }
            
            public event ModuleRowChangeEventHandler ModuleRowChanged;
            
            public event ModuleRowChangeEventHandler ModuleRowChanging;
            
            public event ModuleRowChangeEventHandler ModuleRowDeleted;
            
            public event ModuleRowChangeEventHandler ModuleRowDeleting;
            
            public void AddModuleRow(ModuleRow row) {
                this.Rows.Add(row);
            }
            
            public ModuleRow AddModuleRow(int ModuleId, string ModuleTitle, string EditRoles, int ModuleDefId, string PaneName, int CacheTimeout, int ModuleOrder, bool ShowMobile, TabRow parentTabRowByTab_Module) {
                ModuleRow rowModuleRow = ((ModuleRow)(this.NewRow()));
                rowModuleRow.ItemArray = new object[] {
                        ModuleId,
                        ModuleTitle,
                        EditRoles,
                        ModuleDefId,
                        PaneName,
                        CacheTimeout,
                        ModuleOrder,
                        ShowMobile,
                        parentTabRowByTab_Module[0]};
                this.Rows.Add(rowModuleRow);
                return rowModuleRow;
            }
            
            public ModuleRow FindByModuleId(int ModuleId) {
                return ((ModuleRow)(this.Rows.Find(new object[] {
                            ModuleId})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ModuleDataTable cln = ((ModuleDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ModuleDataTable();
            }
            
            internal void InitVars() {
                this.columnModuleId = this.Columns["ModuleId"];
                this.columnModuleTitle = this.Columns["ModuleTitle"];
                this.columnEditRoles = this.Columns["EditRoles"];
                this.columnModuleDefId = this.Columns["ModuleDefId"];
                this.columnPaneName = this.Columns["PaneName"];
                this.columnCacheTimeout = this.Columns["CacheTimeout"];
                this.columnModuleOrder = this.Columns["ModuleOrder"];
                this.columnShowMobile = this.Columns["ShowMobile"];
                this.columnTabId = this.Columns["TabId"];
            }
            
            private void InitClass() {
                this.columnModuleId = new DataColumn("ModuleId", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnModuleId);
                this.columnModuleTitle = new DataColumn("ModuleTitle", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnModuleTitle);
                this.columnEditRoles = new DataColumn("EditRoles", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnEditRoles);
                this.columnModuleDefId = new DataColumn("ModuleDefId", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnModuleDefId);
                this.columnPaneName = new DataColumn("PaneName", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnPaneName);
                this.columnCacheTimeout = new DataColumn("CacheTimeout", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnCacheTimeout);
                this.columnModuleOrder = new DataColumn("ModuleOrder", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnModuleOrder);
                this.columnShowMobile = new DataColumn("ShowMobile", typeof(bool), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnShowMobile);
                this.columnTabId = new DataColumn("TabId", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnTabId);
                this.Constraints.Add(new UniqueConstraint("ModuleKey", new DataColumn[] {
                                this.columnModuleId}, true));
                this.columnModuleId.AllowDBNull = false;
                this.columnModuleId.Unique = true;
                this.columnModuleId.Namespace = "";
                this.columnModuleTitle.Namespace = "";
                this.columnEditRoles.Namespace = "";
                this.columnModuleDefId.Namespace = "";
                this.columnPaneName.Namespace = "";
                this.columnCacheTimeout.Namespace = "";
                this.columnModuleOrder.Namespace = "";
                this.columnShowMobile.Namespace = "";
            }
            
            public ModuleRow NewModuleRow() {
                return ((ModuleRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ModuleRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ModuleRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ModuleRowChanged != null)) {
                    this.ModuleRowChanged(this, new ModuleRowChangeEvent(((ModuleRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ModuleRowChanging != null)) {
                    this.ModuleRowChanging(this, new ModuleRowChangeEvent(((ModuleRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ModuleRowDeleted != null)) {
                    this.ModuleRowDeleted(this, new ModuleRowChangeEvent(((ModuleRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ModuleRowDeleting != null)) {
                    this.ModuleRowDeleting(this, new ModuleRowChangeEvent(((ModuleRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveModuleRow(ModuleRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleRow : DataRow {
            
            private ModuleDataTable tableModule;
            
            internal ModuleRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableModule = ((ModuleDataTable)(this.Table));
            }
            
            public int ModuleId {
                get {
                    return ((int)(this[this.tableModule.ModuleIdColumn]));
                }
                set {
                    this[this.tableModule.ModuleIdColumn] = value;
                }
            }
            
            public string ModuleTitle {
                get {
                    try {
                        return ((string)(this[this.tableModule.ModuleTitleColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.ModuleTitleColumn] = value;
                }
            }
            
            public string EditRoles {
                get {
                    try {
                        return ((string)(this[this.tableModule.EditRolesColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.EditRolesColumn] = value;
                }
            }
            
            public int ModuleDefId {
                get {
                    try {
                        return ((int)(this[this.tableModule.ModuleDefIdColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.ModuleDefIdColumn] = value;
                }
            }
            
            public string PaneName {
                get {
                    try {
                        return ((string)(this[this.tableModule.PaneNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.PaneNameColumn] = value;
                }
            }
            
            public int CacheTimeout {
                get {
                    try {
                        return ((int)(this[this.tableModule.CacheTimeoutColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.CacheTimeoutColumn] = value;
                }
            }
            
            public int ModuleOrder {
                get {
                    try {
                        return ((int)(this[this.tableModule.ModuleOrderColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.ModuleOrderColumn] = value;
                }
            }
            
            public bool ShowMobile {
                get {
                    try {
                        return ((bool)(this[this.tableModule.ShowMobileColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModule.ShowMobileColumn] = value;
                }
            }
            
            public TabRow TabRow {
                get {
                    return ((TabRow)(this.GetParentRow(this.Table.ParentRelations["Tab_Module"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["Tab_Module"]);
                }
            }
            
            public bool IsModuleTitleNull() {
                return this.IsNull(this.tableModule.ModuleTitleColumn);
            }
            
            public void SetModuleTitleNull() {
                this[this.tableModule.ModuleTitleColumn] = System.Convert.DBNull;
            }
            
            public bool IsEditRolesNull() {
                return this.IsNull(this.tableModule.EditRolesColumn);
            }
            
            public void SetEditRolesNull() {
                this[this.tableModule.EditRolesColumn] = System.Convert.DBNull;
            }
            
            public bool IsModuleDefIdNull() {
                return this.IsNull(this.tableModule.ModuleDefIdColumn);
            }
            
            public void SetModuleDefIdNull() {
                this[this.tableModule.ModuleDefIdColumn] = System.Convert.DBNull;
            }
            
            public bool IsPaneNameNull() {
                return this.IsNull(this.tableModule.PaneNameColumn);
            }
            
            public void SetPaneNameNull() {
                this[this.tableModule.PaneNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsCacheTimeoutNull() {
                return this.IsNull(this.tableModule.CacheTimeoutColumn);
            }
            
            public void SetCacheTimeoutNull() {
                this[this.tableModule.CacheTimeoutColumn] = System.Convert.DBNull;
            }
            
            public bool IsModuleOrderNull() {
                return this.IsNull(this.tableModule.ModuleOrderColumn);
            }
            
            public void SetModuleOrderNull() {
                this[this.tableModule.ModuleOrderColumn] = System.Convert.DBNull;
            }
            
            public bool IsShowMobileNull() {
                return this.IsNull(this.tableModule.ShowMobileColumn);
            }
            
            public void SetShowMobileNull() {
                this[this.tableModule.ShowMobileColumn] = System.Convert.DBNull;
            }
            
            public SettingsRow[] GetSettingsRows() {
                return ((SettingsRow[])(this.GetChildRows(this.Table.ChildRelations["Module_Settings"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleRowChangeEvent : EventArgs {
            
            private ModuleRow eventRow;
            
            private DataRowAction eventAction;
            
            public ModuleRowChangeEvent(ModuleRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ModuleRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingsDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnSettings_Id;
            
            private DataColumn columnModuleId;
            
            internal SettingsDataTable() : 
                    base("Settings") {
                this.InitClass();
            }
            
            internal SettingsDataTable(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 Settings_IdColumn {
                get {
                    return this.columnSettings_Id;
                }
            }
            
            internal DataColumn ModuleIdColumn {
                get {
                    return this.columnModuleId;
                }
            }
            
            public SettingsRow this[int index] {
                get {
                    return ((SettingsRow)(this.Rows[index]));
                }
            }
            
            public event SettingsRowChangeEventHandler SettingsRowChanged;
            
            public event SettingsRowChangeEventHandler SettingsRowChanging;
            
            public event SettingsRowChangeEventHandler SettingsRowDeleted;
            
            public event SettingsRowChangeEventHandler SettingsRowDeleting;
            
            public void AddSettingsRow(SettingsRow row) {
                this.Rows.Add(row);
            }
            
            public SettingsRow AddSettingsRow(ModuleRow parentModuleRowByModule_Settings) {
                SettingsRow rowSettingsRow = ((SettingsRow)(this.NewRow()));
                rowSettingsRow.ItemArray = new object[] {
                        null,
                        parentModuleRowByModule_Settings[0]};
                this.Rows.Add(rowSettingsRow);
                return rowSettingsRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                SettingsDataTable cln = ((SettingsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new SettingsDataTable();
            }
            
            internal void InitVars() {
                this.columnSettings_Id = this.Columns["Settings_Id"];
                this.columnModuleId = this.Columns["ModuleId"];
            }
            
            private void InitClass() {
                this.columnSettings_Id = new DataColumn("Settings_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnSettings_Id);
                this.columnModuleId = new DataColumn("ModuleId", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnModuleId);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnSettings_Id}, true));
                this.columnSettings_Id.AutoIncrement = true;
                this.columnSettings_Id.AllowDBNull = false;
                this.columnSettings_Id.Unique = true;
            }
            
            public SettingsRow NewSettingsRow() {
                return ((SettingsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new SettingsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SettingsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SettingsRowChanged != null)) {
                    this.SettingsRowChanged(this, new SettingsRowChangeEvent(((SettingsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SettingsRowChanging != null)) {
                    this.SettingsRowChanging(this, new SettingsRowChangeEvent(((SettingsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SettingsRowDeleted != null)) {
                    this.SettingsRowDeleted(this, new SettingsRowChangeEvent(((SettingsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SettingsRowDeleting != null)) {
                    this.SettingsRowDeleting(this, new SettingsRowChangeEvent(((SettingsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSettingsRow(SettingsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingsRow : DataRow {
            
            private SettingsDataTable tableSettings;
            
            internal SettingsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSettings = ((SettingsDataTable)(this.Table));
            }
            
            public ModuleRow ModuleRow {
                get {
                    return ((ModuleRow)(this.GetParentRow(this.Table.ParentRelations["Module_Settings"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["Module_Settings"]);
                }
            }
            
            public SettingRow[] GetSettingRows() {
                return ((SettingRow[])(this.GetChildRows(this.Table.ChildRelations["Settings_Setting"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingsRowChangeEvent : EventArgs {
            
            private SettingsRow eventRow;
            
            private DataRowAction eventAction;
            
            public SettingsRowChangeEvent(SettingsRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SettingsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnName;
            
            private DataColumn columnSetting_Text;
            
            private DataColumn columnSettings_Id;
            
            internal SettingDataTable() : 
                    base("Setting") {
                this.InitClass();
            }
            
            internal SettingDataTable(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 NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            internal DataColumn Setting_TextColumn {
                get {
                    return this.columnSetting_Text;
                }
            }
            
            internal DataColumn Settings_IdColumn {
                get {
                    return this.columnSettings_Id;
                }
            }
            
            public SettingRow this[int index] {
                get {
                    return ((SettingRow)(this.Rows[index]));
                }
            }
            
            public event SettingRowChangeEventHandler SettingRowChanged;
            
            public event SettingRowChangeEventHandler SettingRowChanging;
            
            public event SettingRowChangeEventHandler SettingRowDeleted;
            
            public event SettingRowChangeEventHandler SettingRowDeleting;
            
            public void AddSettingRow(SettingRow row) {
                this.Rows.Add(row);
            }
            
            public SettingRow AddSettingRow(string Name, string Setting_Text, SettingsRow parentSettingsRowBySettings_Setting) {
                SettingRow rowSettingRow = ((SettingRow)(this.NewRow()));
                rowSettingRow.ItemArray = new object[] {
                        Name,
                        Setting_Text,
                        parentSettingsRowBySettings_Setting[0]};
                this.Rows.Add(rowSettingRow);
                return rowSettingRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                SettingDataTable cln = ((SettingDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new SettingDataTable();
            }
            
            internal void InitVars() {
                this.columnName = this.Columns["Name"];
                this.columnSetting_Text = this.Columns["Setting_Text"];
                this.columnSettings_Id = this.Columns["Settings_Id"];
            }
            
            private void InitClass() {
                this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnName);
                this.columnSetting_Text = new DataColumn("Setting_Text", typeof(string), null, System.Data.MappingType.SimpleContent);
                this.Columns.Add(this.columnSetting_Text);
                this.columnSettings_Id = new DataColumn("Settings_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnSettings_Id);
                this.columnName.Namespace = "";
            }
            
            public SettingRow NewSettingRow() {
                return ((SettingRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new SettingRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(SettingRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.SettingRowChanged != null)) {
                    this.SettingRowChanged(this, new SettingRowChangeEvent(((SettingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.SettingRowChanging != null)) {
                    this.SettingRowChanging(this, new SettingRowChangeEvent(((SettingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.SettingRowDeleted != null)) {
                    this.SettingRowDeleted(this, new SettingRowChangeEvent(((SettingRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.SettingRowDeleting != null)) {
                    this.SettingRowDeleting(this, new SettingRowChangeEvent(((SettingRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveSettingRow(SettingRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingRow : DataRow {
            
            private SettingDataTable tableSetting;
            
            internal SettingRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableSetting = ((SettingDataTable)(this.Table));
            }
            
            public string Name {
                get {
                    try {
                        return ((string)(this[this.tableSetting.NameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSetting.NameColumn] = value;
                }
            }
            
            public string Setting_Text {
                get {
                    try {
                        return ((string)(this[this.tableSetting.Setting_TextColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableSetting.Setting_TextColumn] = value;
                }
            }
            
            public SettingsRow SettingsRow {
                get {
                    return ((SettingsRow)(this.GetParentRow(this.Table.ParentRelations["Settings_Setting"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["Settings_Setting"]);
                }
            }
            
            public bool IsNameNull() {
                return this.IsNull(this.tableSetting.NameColumn);
            }
            
            public void SetNameNull() {
                this[this.tableSetting.NameColumn] = System.Convert.DBNull;
            }
            
            public bool IsSetting_TextNull() {
                return this.IsNull(this.tableSetting.Setting_TextColumn);
            }
            
            public void SetSetting_TextNull() {
                this[this.tableSetting.Setting_TextColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class SettingRowChangeEvent : EventArgs {
            
            private SettingRow eventRow;
            
            private DataRowAction eventAction;
            
            public SettingRowChangeEvent(SettingRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public SettingRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleDefinitionDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnFriendlyName;
            
            private DataColumn columnMobileSourceFile;
            
            private DataColumn columnDesktopSourceFile;
            
            private DataColumn columnModuleDefId;
            
            internal ModuleDefinitionDataTable() : 
                    base("ModuleDefinition") {
                this.InitClass();
            }
            
            internal ModuleDefinitionDataTable(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 FriendlyNameColumn {
                get {
                    return this.columnFriendlyName;
                }
            }
            
            internal DataColumn MobileSourceFileColumn {
                get {
                    return this.columnMobileSourceFile;
                }
            }
            
            internal DataColumn DesktopSourceFileColumn {
                get {
                    return this.columnDesktopSourceFile;
                }
            }
            
            internal DataColumn ModuleDefIdColumn {
                get {
                    return this.columnModuleDefId;
                }
            }
            
            public ModuleDefinitionRow this[int index] {
                get {
                    return ((ModuleDefinitionRow)(this.Rows[index]));
                }
            }
            
            public event ModuleDefinitionRowChangeEventHandler ModuleDefinitionRowChanged;
            
            public event ModuleDefinitionRowChangeEventHandler ModuleDefinitionRowChanging;
            
            public event ModuleDefinitionRowChangeEventHandler ModuleDefinitionRowDeleted;
            
            public event ModuleDefinitionRowChangeEventHandler ModuleDefinitionRowDeleting;
            
            public void AddModuleDefinitionRow(ModuleDefinitionRow row) {
                this.Rows.Add(row);
            }
            
            public ModuleDefinitionRow AddModuleDefinitionRow(string FriendlyName, string MobileSourceFile, string DesktopSourceFile, int ModuleDefId) {
                ModuleDefinitionRow rowModuleDefinitionRow = ((ModuleDefinitionRow)(this.NewRow()));
                rowModuleDefinitionRow.ItemArray = new object[] {
                        FriendlyName,
                        MobileSourceFile,
                        DesktopSourceFile,
                        ModuleDefId};
                this.Rows.Add(rowModuleDefinitionRow);
                return rowModuleDefinitionRow;
            }
            
            public ModuleDefinitionRow FindByModuleDefId(int ModuleDefId) {
                return ((ModuleDefinitionRow)(this.Rows.Find(new object[] {
                            ModuleDefId})));
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ModuleDefinitionDataTable cln = ((ModuleDefinitionDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ModuleDefinitionDataTable();
            }
            
            internal void InitVars() {
                this.columnFriendlyName = this.Columns["FriendlyName"];
                this.columnMobileSourceFile = this.Columns["MobileSourceFile"];
                this.columnDesktopSourceFile = this.Columns["DesktopSourceFile"];
                this.columnModuleDefId = this.Columns["ModuleDefId"];
            }
            
            private void InitClass() {
                this.columnFriendlyName = new DataColumn("FriendlyName", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnFriendlyName);
                this.columnMobileSourceFile = new DataColumn("MobileSourceFile", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnMobileSourceFile);
                this.columnDesktopSourceFile = new DataColumn("DesktopSourceFile", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnDesktopSourceFile);
                this.columnModuleDefId = new DataColumn("ModuleDefId", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnModuleDefId);
                this.Constraints.Add(new UniqueConstraint("ModDefKey", new DataColumn[] {
                                this.columnModuleDefId}, true));
                this.columnFriendlyName.Namespace = "";
                this.columnMobileSourceFile.Namespace = "";
                this.columnDesktopSourceFile.Namespace = "";
                this.columnModuleDefId.AllowDBNull = false;
                this.columnModuleDefId.Unique = true;
                this.columnModuleDefId.Namespace = "";
            }
            
            public ModuleDefinitionRow NewModuleDefinitionRow() {
                return ((ModuleDefinitionRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ModuleDefinitionRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ModuleDefinitionRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ModuleDefinitionRowChanged != null)) {
                    this.ModuleDefinitionRowChanged(this, new ModuleDefinitionRowChangeEvent(((ModuleDefinitionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ModuleDefinitionRowChanging != null)) {
                    this.ModuleDefinitionRowChanging(this, new ModuleDefinitionRowChangeEvent(((ModuleDefinitionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ModuleDefinitionRowDeleted != null)) {
                    this.ModuleDefinitionRowDeleted(this, new ModuleDefinitionRowChangeEvent(((ModuleDefinitionRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ModuleDefinitionRowDeleting != null)) {
                    this.ModuleDefinitionRowDeleting(this, new ModuleDefinitionRowChangeEvent(((ModuleDefinitionRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveModuleDefinitionRow(ModuleDefinitionRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleDefinitionRow : DataRow {
            
            private ModuleDefinitionDataTable tableModuleDefinition;
            
            internal ModuleDefinitionRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableModuleDefinition = ((ModuleDefinitionDataTable)(this.Table));
            }
            
            public string FriendlyName {
                get {
                    try {
                        return ((string)(this[this.tableModuleDefinition.FriendlyNameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuleDefinition.FriendlyNameColumn] = value;
                }
            }
            
            public string MobileSourceFile {
                get {
                    try {
                        return ((string)(this[this.tableModuleDefinition.MobileSourceFileColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuleDefinition.MobileSourceFileColumn] = value;
                }
            }
            
            public string DesktopSourceFile {
                get {
                    try {
                        return ((string)(this[this.tableModuleDefinition.DesktopSourceFileColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableModuleDefinition.DesktopSourceFileColumn] = value;
                }
            }
            
            public int ModuleDefId {
                get {
                    return ((int)(this[this.tableModuleDefinition.ModuleDefIdColumn]));
                }
                set {
                    this[this.tableModuleDefinition.ModuleDefIdColumn] = value;
                }
            }
            
            public bool IsFriendlyNameNull() {
                return this.IsNull(this.tableModuleDefinition.FriendlyNameColumn);
            }
            
            public void SetFriendlyNameNull() {
                this[this.tableModuleDefinition.FriendlyNameColumn] = System.Convert.DBNull;
            }
            
            public bool IsMobileSourceFileNull() {
                return this.IsNull(this.tableModuleDefinition.MobileSourceFileColumn);
            }
            
            public void SetMobileSourceFileNull() {
                this[this.tableModuleDefinition.MobileSourceFileColumn] = System.Convert.DBNull;
            }
            
            public bool IsDesktopSourceFileNull() {
                return this.IsNull(this.tableModuleDefinition.DesktopSourceFileColumn);
            }
            
            public void SetDesktopSourceFileNull() {
                this[this.tableModuleDefinition.DesktopSourceFileColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ModuleDefinitionRowChangeEvent : EventArgs {
            
            private ModuleDefinitionRow eventRow;
            
            private DataRowAction eventAction;
            
            public ModuleDefinitionRowChangeEvent(ModuleDefinitionRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ModuleDefinitionRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
