ds3.cs
上传用户:clhb88
上传日期:2009-09-26
资源大小:3468k
文件大小:12k
源码类别:

医药行业

开发平台:

C#

  1. //------------------------------------------------------------------------------
  2. // <autogenerated>
  3. //     This code was generated by a tool.
  4. //     Runtime Version: 1.1.4322.573
  5. //
  6. //     Changes to this file may cause incorrect behavior and will be lost if 
  7. //     the code is regenerated.
  8. // </autogenerated>
  9. //------------------------------------------------------------------------------
  10. namespace 医院管理系统 {
  11.     using System;
  12.     using System.Data;
  13.     using System.Xml;
  14.     using System.Runtime.Serialization;
  15.     
  16.     
  17.     [Serializable()]
  18.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  19.     [System.Diagnostics.DebuggerStepThrough()]
  20.     [System.ComponentModel.ToolboxItem(true)]
  21.     public class ds3 : DataSet {
  22.         
  23.         private _TableDataTable table_Table;
  24.         
  25.         public ds3() {
  26.             this.InitClass();
  27.             System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  28.             this.Tables.CollectionChanged += schemaChangedHandler;
  29.             this.Relations.CollectionChanged += schemaChangedHandler;
  30.         }
  31.         
  32.         protected ds3(SerializationInfo info, StreamingContext context) {
  33.             string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
  34.             if ((strSchema != null)) {
  35.                 DataSet ds = new DataSet();
  36.                 ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
  37.                 if ((ds.Tables["Table"] != null)) {
  38.                     this.Tables.Add(new _TableDataTable(ds.Tables["Table"]));
  39.                 }
  40.                 this.DataSetName = ds.DataSetName;
  41.                 this.Prefix = ds.Prefix;
  42.                 this.Namespace = ds.Namespace;
  43.                 this.Locale = ds.Locale;
  44.                 this.CaseSensitive = ds.CaseSensitive;
  45.                 this.EnforceConstraints = ds.EnforceConstraints;
  46.                 this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
  47.                 this.InitVars();
  48.             }
  49.             else {
  50.                 this.InitClass();
  51.             }
  52.             this.GetSerializationData(info, context);
  53.             System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
  54.             this.Tables.CollectionChanged += schemaChangedHandler;
  55.             this.Relations.CollectionChanged += schemaChangedHandler;
  56.         }
  57.         
  58.         [System.ComponentModel.Browsable(false)]
  59.         [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
  60.         public _TableDataTable _Table {
  61.             get {
  62.                 return this.table_Table;
  63.             }
  64.         }
  65.         
  66.         public override DataSet Clone() {
  67.             ds3 cln = ((ds3)(base.Clone()));
  68.             cln.InitVars();
  69.             return cln;
  70.         }
  71.         
  72.         protected override bool ShouldSerializeTables() {
  73.             return false;
  74.         }
  75.         
  76.         protected override bool ShouldSerializeRelations() {
  77.             return false;
  78.         }
  79.         
  80.         protected override void ReadXmlSerializable(XmlReader reader) {
  81.             this.Reset();
  82.             DataSet ds = new DataSet();
  83.             ds.ReadXml(reader);
  84.             if ((ds.Tables["Table"] != null)) {
  85.                 this.Tables.Add(new _TableDataTable(ds.Tables["Table"]));
  86.             }
  87.             this.DataSetName = ds.DataSetName;
  88.             this.Prefix = ds.Prefix;
  89.             this.Namespace = ds.Namespace;
  90.             this.Locale = ds.Locale;
  91.             this.CaseSensitive = ds.CaseSensitive;
  92.             this.EnforceConstraints = ds.EnforceConstraints;
  93.             this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
  94.             this.InitVars();
  95.         }
  96.         
  97.         protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
  98.             System.IO.MemoryStream stream = new System.IO.MemoryStream();
  99.             this.WriteXmlSchema(new XmlTextWriter(stream, null));
  100.             stream.Position = 0;
  101.             return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
  102.         }
  103.         
  104.         internal void InitVars() {
  105.             this.table_Table = ((_TableDataTable)(this.Tables["Table"]));
  106.             if ((this.table_Table != null)) {
  107.                 this.table_Table.InitVars();
  108.             }
  109.         }
  110.         
  111.         private void InitClass() {
  112.             this.DataSetName = "ds3";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/ds3.xsd";
  115.             this.Locale = new System.Globalization.CultureInfo("zh-CN");
  116.             this.CaseSensitive = false;
  117.             this.EnforceConstraints = true;
  118.             this.table_Table = new _TableDataTable();
  119.             this.Tables.Add(this.table_Table);
  120.         }
  121.         
  122.         private bool ShouldSerialize_Table() {
  123.             return false;
  124.         }
  125.         
  126.         private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
  127.             if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
  128.                 this.InitVars();
  129.             }
  130.         }
  131.         
  132.         public delegate void _TableRowChangeEventHandler(object sender, _TableRowChangeEvent e);
  133.         
  134.         [System.Diagnostics.DebuggerStepThrough()]
  135.         public class _TableDataTable : DataTable, System.Collections.IEnumerable {
  136.             
  137.             private DataColumn column姓名;
  138.             
  139.             internal _TableDataTable() : 
  140.                     base("Table") {
  141.                 this.InitClass();
  142.             }
  143.             
  144.             internal _TableDataTable(DataTable table) : 
  145.                     base(table.TableName) {
  146.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  147.                     this.CaseSensitive = table.CaseSensitive;
  148.                 }
  149.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  150.                     this.Locale = table.Locale;
  151.                 }
  152.                 if ((table.Namespace != table.DataSet.Namespace)) {
  153.                     this.Namespace = table.Namespace;
  154.                 }
  155.                 this.Prefix = table.Prefix;
  156.                 this.MinimumCapacity = table.MinimumCapacity;
  157.                 this.DisplayExpression = table.DisplayExpression;
  158.             }
  159.             
  160.             [System.ComponentModel.Browsable(false)]
  161.             public int Count {
  162.                 get {
  163.                     return this.Rows.Count;
  164.                 }
  165.             }
  166.             
  167.             internal DataColumn 姓名Column {
  168.                 get {
  169.                     return this.column姓名;
  170.                 }
  171.             }
  172.             
  173.             public _TableRow this[int index] {
  174.                 get {
  175.                     return ((_TableRow)(this.Rows[index]));
  176.                 }
  177.             }
  178.             
  179.             public event _TableRowChangeEventHandler _TableRowChanged;
  180.             
  181.             public event _TableRowChangeEventHandler _TableRowChanging;
  182.             
  183.             public event _TableRowChangeEventHandler _TableRowDeleted;
  184.             
  185.             public event _TableRowChangeEventHandler _TableRowDeleting;
  186.             
  187.             public void Add_TableRow(_TableRow row) {
  188.                 this.Rows.Add(row);
  189.             }
  190.             
  191.             public _TableRow Add_TableRow(string 姓名) {
  192.                 _TableRow row_TableRow = ((_TableRow)(this.NewRow()));
  193.                 row_TableRow.ItemArray = new object[] {
  194.                         姓名};
  195.                 this.Rows.Add(row_TableRow);
  196.                 return row_TableRow;
  197.             }
  198.             
  199.             public System.Collections.IEnumerator GetEnumerator() {
  200.                 return this.Rows.GetEnumerator();
  201.             }
  202.             
  203.             public override DataTable Clone() {
  204.                 _TableDataTable cln = ((_TableDataTable)(base.Clone()));
  205.                 cln.InitVars();
  206.                 return cln;
  207.             }
  208.             
  209.             protected override DataTable CreateInstance() {
  210.                 return new _TableDataTable();
  211.             }
  212.             
  213.             internal void InitVars() {
  214.                 this.column姓名 = this.Columns["姓名"];
  215.             }
  216.             
  217.             private void InitClass() {
  218.                 this.column姓名 = new DataColumn("姓名", typeof(string), null, System.Data.MappingType.Element);
  219.                 this.Columns.Add(this.column姓名);
  220.             }
  221.             
  222.             public _TableRow New_TableRow() {
  223.                 return ((_TableRow)(this.NewRow()));
  224.             }
  225.             
  226.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  227.                 return new _TableRow(builder);
  228.             }
  229.             
  230.             protected override System.Type GetRowType() {
  231.                 return typeof(_TableRow);
  232.             }
  233.             
  234.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  235.                 base.OnRowChanged(e);
  236.                 if ((this._TableRowChanged != null)) {
  237.                     this._TableRowChanged(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  238.                 }
  239.             }
  240.             
  241.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  242.                 base.OnRowChanging(e);
  243.                 if ((this._TableRowChanging != null)) {
  244.                     this._TableRowChanging(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  245.                 }
  246.             }
  247.             
  248.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  249.                 base.OnRowDeleted(e);
  250.                 if ((this._TableRowDeleted != null)) {
  251.                     this._TableRowDeleted(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  252.                 }
  253.             }
  254.             
  255.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  256.                 base.OnRowDeleting(e);
  257.                 if ((this._TableRowDeleting != null)) {
  258.                     this._TableRowDeleting(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  259.                 }
  260.             }
  261.             
  262.             public void Remove_TableRow(_TableRow row) {
  263.                 this.Rows.Remove(row);
  264.             }
  265.         }
  266.         
  267.         [System.Diagnostics.DebuggerStepThrough()]
  268.         public class _TableRow : DataRow {
  269.             
  270.             private _TableDataTable table_Table;
  271.             
  272.             internal _TableRow(DataRowBuilder rb) : 
  273.                     base(rb) {
  274.                 this.table_Table = ((_TableDataTable)(this.Table));
  275.             }
  276.             
  277.             public string 姓名 {
  278.                 get {
  279.                     try {
  280.                         return ((string)(this[this.table_Table.姓名Column]));
  281.                     }
  282.                     catch (InvalidCastException e) {
  283.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  284.                     }
  285.                 }
  286.                 set {
  287.                     this[this.table_Table.姓名Column] = value;
  288.                 }
  289.             }
  290.             
  291.             public bool Is姓名Null() {
  292.                 return this.IsNull(this.table_Table.姓名Column);
  293.             }
  294.             
  295.             public void Set姓名Null() {
  296.                 this[this.table_Table.姓名Column] = System.Convert.DBNull;
  297.             }
  298.         }
  299.         
  300.         [System.Diagnostics.DebuggerStepThrough()]
  301.         public class _TableRowChangeEvent : EventArgs {
  302.             
  303.             private _TableRow eventRow;
  304.             
  305.             private DataRowAction eventAction;
  306.             
  307.             public _TableRowChangeEvent(_TableRow row, DataRowAction action) {
  308.                 this.eventRow = row;
  309.                 this.eventAction = action;
  310.             }
  311.             
  312.             public _TableRow Row {
  313.                 get {
  314.                     return this.eventRow;
  315.                 }
  316.             }
  317.             
  318.             public DataRowAction Action {
  319.                 get {
  320.                     return this.eventAction;
  321.                 }
  322.             }
  323.         }
  324.     }
  325. }