⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 邮编区号.cs

📁 该源代码用 C# 写成
💻 CS
📖 第 1 页 / 共 3 页
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace Org.InteliIM.Activities.Banks.InfoBank.ZipCode {
    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 ZipCode : DataSet {
        
        private ProvinceDataTable tableProvince;
        
        private CityDataTable tableCity;
        
        private DataRelation relationProvince_City;
        
        public ZipCode() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected ZipCode(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["Province"] != null)) {
                    this.Tables.Add(new ProvinceDataTable(ds.Tables["Province"]));
                }
                if ((ds.Tables["City"] != null)) {
                    this.Tables.Add(new CityDataTable(ds.Tables["City"]));
                }
                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 ProvinceDataTable Province {
            get {
                return this.tableProvince;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public CityDataTable City {
            get {
                return this.tableCity;
            }
        }
        
        public override DataSet Clone() {
            ZipCode cln = ((ZipCode)(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["Province"] != null)) {
                this.Tables.Add(new ProvinceDataTable(ds.Tables["Province"]));
            }
            if ((ds.Tables["City"] != null)) {
                this.Tables.Add(new CityDataTable(ds.Tables["City"]));
            }
            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.tableProvince = ((ProvinceDataTable)(this.Tables["Province"]));
            if ((this.tableProvince != null)) {
                this.tableProvince.InitVars();
            }
            this.tableCity = ((CityDataTable)(this.Tables["City"]));
            if ((this.tableCity != null)) {
                this.tableCity.InitVars();
            }
            this.relationProvince_City = this.Relations["Province_City"];
        }
        
        private void InitClass() {
            this.DataSetName = "ZipCode";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/邮编区号.xsd";
            this.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableProvince = new ProvinceDataTable();
            this.Tables.Add(this.tableProvince);
            this.tableCity = new CityDataTable();
            this.Tables.Add(this.tableCity);
            ForeignKeyConstraint fkc;
            fkc = new ForeignKeyConstraint("Province_City", new DataColumn[] {
                        this.tableProvince.Province_IdColumn}, new DataColumn[] {
                        this.tableCity.Province_IdColumn});
            this.tableCity.Constraints.Add(fkc);
            fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
            fkc.DeleteRule = System.Data.Rule.Cascade;
            fkc.UpdateRule = System.Data.Rule.Cascade;
            this.relationProvince_City = new DataRelation("Province_City", new DataColumn[] {
                        this.tableProvince.Province_IdColumn}, new DataColumn[] {
                        this.tableCity.Province_IdColumn}, false);
            this.relationProvince_City.Nested = true;
            this.Relations.Add(this.relationProvince_City);
        }
        
        private bool ShouldSerializeProvince() {
            return false;
        }
        
        private bool ShouldSerializeCity() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void ProvinceRowChangeEventHandler(object sender, ProvinceRowChangeEvent e);
        
        public delegate void CityRowChangeEventHandler(object sender, CityRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ProvinceDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnName;
            
            private DataColumn columnAbbrev;
            
            private DataColumn columnIsMunicipality;
            
            private DataColumn columnProvinceCity;
            
            private DataColumn columnProvince_Id;
            
            internal ProvinceDataTable() : 
                    base("Province") {
                this.InitClass();
            }
            
            internal ProvinceDataTable(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 AbbrevColumn {
                get {
                    return this.columnAbbrev;
                }
            }
            
            internal DataColumn IsMunicipalityColumn {
                get {
                    return this.columnIsMunicipality;
                }
            }
            
            internal DataColumn ProvinceCityColumn {
                get {
                    return this.columnProvinceCity;
                }
            }
            
            internal DataColumn Province_IdColumn {
                get {
                    return this.columnProvince_Id;
                }
            }
            
            public ProvinceRow this[int index] {
                get {
                    return ((ProvinceRow)(this.Rows[index]));
                }
            }
            
            public event ProvinceRowChangeEventHandler ProvinceRowChanged;
            
            public event ProvinceRowChangeEventHandler ProvinceRowChanging;
            
            public event ProvinceRowChangeEventHandler ProvinceRowDeleted;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -