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

医药行业

开发平台:

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 sda1 : DataSet {
  22.         
  23.         private _TableDataTable table_Table;
  24.         
  25.         public sda1() {
  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 sda1(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.             sda1 cln = ((sda1)(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 = "sda1";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/sda1.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.             private DataColumn column姓名;
  140.             
  141.             private DataColumn column年龄;
  142.             
  143.             private DataColumn column性别;
  144.             
  145.             internal _TableDataTable() : 
  146.                     base("Table") {
  147.                 this.InitClass();
  148.             }
  149.             
  150.             internal _TableDataTable(DataTable table) : 
  151.                     base(table.TableName) {
  152.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  153.                     this.CaseSensitive = table.CaseSensitive;
  154.                 }
  155.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  156.                     this.Locale = table.Locale;
  157.                 }
  158.                 if ((table.Namespace != table.DataSet.Namespace)) {
  159.                     this.Namespace = table.Namespace;
  160.                 }
  161.                 this.Prefix = table.Prefix;
  162.                 this.MinimumCapacity = table.MinimumCapacity;
  163.                 this.DisplayExpression = table.DisplayExpression;
  164.             }
  165.             
  166.             [System.ComponentModel.Browsable(false)]
  167.             public int Count {
  168.                 get {
  169.                     return this.Rows.Count;
  170.                 }
  171.             }
  172.             
  173.             internal DataColumn 挂号号码Column {
  174.                 get {
  175.                     return this.column挂号号码;
  176.                 }
  177.             }
  178.             
  179.             internal DataColumn 姓名Column {
  180.                 get {
  181.                     return this.column姓名;
  182.                 }
  183.             }
  184.             
  185.             internal DataColumn 年龄Column {
  186.                 get {
  187.                     return this.column年龄;
  188.                 }
  189.             }
  190.             
  191.             internal DataColumn 性别Column {
  192.                 get {
  193.                     return this.column性别;
  194.                 }
  195.             }
  196.             
  197.             public _TableRow this[int index] {
  198.                 get {
  199.                     return ((_TableRow)(this.Rows[index]));
  200.                 }
  201.             }
  202.             
  203.             public event _TableRowChangeEventHandler _TableRowChanged;
  204.             
  205.             public event _TableRowChangeEventHandler _TableRowChanging;
  206.             
  207.             public event _TableRowChangeEventHandler _TableRowDeleted;
  208.             
  209.             public event _TableRowChangeEventHandler _TableRowDeleting;
  210.             
  211.             public void Add_TableRow(_TableRow row) {
  212.                 this.Rows.Add(row);
  213.             }
  214.             
  215.             public _TableRow Add_TableRow(string 姓名, string 年龄, string 性别) {
  216.                 _TableRow row_TableRow = ((_TableRow)(this.NewRow()));
  217.                 row_TableRow.ItemArray = new object[] {
  218.                         null,
  219.                         姓名,
  220.                         年龄,
  221.                         性别};
  222.                 this.Rows.Add(row_TableRow);
  223.                 return row_TableRow;
  224.             }
  225.             
  226.             public _TableRow FindBy挂号号码(long 挂号号码) {
  227.                 return ((_TableRow)(this.Rows.Find(new object[] {
  228.                             挂号号码})));
  229.             }
  230.             
  231.             public System.Collections.IEnumerator GetEnumerator() {
  232.                 return this.Rows.GetEnumerator();
  233.             }
  234.             
  235.             public override DataTable Clone() {
  236.                 _TableDataTable cln = ((_TableDataTable)(base.Clone()));
  237.                 cln.InitVars();
  238.                 return cln;
  239.             }
  240.             
  241.             protected override DataTable CreateInstance() {
  242.                 return new _TableDataTable();
  243.             }
  244.             
  245.             internal void InitVars() {
  246.                 this.column挂号号码 = this.Columns["挂号号码"];
  247.                 this.column姓名 = this.Columns["姓名"];
  248.                 this.column年龄 = this.Columns["年龄"];
  249.                 this.column性别 = this.Columns["性别"];
  250.             }
  251.             
  252.             private void InitClass() {
  253.                 this.column挂号号码 = new DataColumn("挂号号码", typeof(long), null, System.Data.MappingType.Element);
  254.                 this.Columns.Add(this.column挂号号码);
  255.                 this.column姓名 = new DataColumn("姓名", typeof(string), null, System.Data.MappingType.Element);
  256.                 this.Columns.Add(this.column姓名);
  257.                 this.column年龄 = new DataColumn("年龄", typeof(string), null, System.Data.MappingType.Element);
  258.                 this.Columns.Add(this.column年龄);
  259.                 this.column性别 = new DataColumn("性别", typeof(string), null, System.Data.MappingType.Element);
  260.                 this.Columns.Add(this.column性别);
  261.                 this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
  262.                                 this.column挂号号码}, true));
  263.                 this.column挂号号码.AutoIncrement = true;
  264.                 this.column挂号号码.AllowDBNull = false;
  265.                 this.column挂号号码.ReadOnly = true;
  266.                 this.column挂号号码.Unique = true;
  267.             }
  268.             
  269.             public _TableRow New_TableRow() {
  270.                 return ((_TableRow)(this.NewRow()));
  271.             }
  272.             
  273.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  274.                 return new _TableRow(builder);
  275.             }
  276.             
  277.             protected override System.Type GetRowType() {
  278.                 return typeof(_TableRow);
  279.             }
  280.             
  281.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  282.                 base.OnRowChanged(e);
  283.                 if ((this._TableRowChanged != null)) {
  284.                     this._TableRowChanged(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  285.                 }
  286.             }
  287.             
  288.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  289.                 base.OnRowChanging(e);
  290.                 if ((this._TableRowChanging != null)) {
  291.                     this._TableRowChanging(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  292.                 }
  293.             }
  294.             
  295.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  296.                 base.OnRowDeleted(e);
  297.                 if ((this._TableRowDeleted != null)) {
  298.                     this._TableRowDeleted(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  299.                 }
  300.             }
  301.             
  302.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  303.                 base.OnRowDeleting(e);
  304.                 if ((this._TableRowDeleting != null)) {
  305.                     this._TableRowDeleting(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  306.                 }
  307.             }
  308.             
  309.             public void Remove_TableRow(_TableRow row) {
  310.                 this.Rows.Remove(row);
  311.             }
  312.         }
  313.         
  314.         [System.Diagnostics.DebuggerStepThrough()]
  315.         public class _TableRow : DataRow {
  316.             
  317.             private _TableDataTable table_Table;
  318.             
  319.             internal _TableRow(DataRowBuilder rb) : 
  320.                     base(rb) {
  321.                 this.table_Table = ((_TableDataTable)(this.Table));
  322.             }
  323.             
  324.             public long 挂号号码 {
  325.                 get {
  326.                     return ((long)(this[this.table_Table.挂号号码Column]));
  327.                 }
  328.                 set {
  329.                     this[this.table_Table.挂号号码Column] = value;
  330.                 }
  331.             }
  332.             
  333.             public string 姓名 {
  334.                 get {
  335.                     try {
  336.                         return ((string)(this[this.table_Table.姓名Column]));
  337.                     }
  338.                     catch (InvalidCastException e) {
  339.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  340.                     }
  341.                 }
  342.                 set {
  343.                     this[this.table_Table.姓名Column] = value;
  344.                 }
  345.             }
  346.             
  347.             public string 年龄 {
  348.                 get {
  349.                     try {
  350.                         return ((string)(this[this.table_Table.年龄Column]));
  351.                     }
  352.                     catch (InvalidCastException e) {
  353.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  354.                     }
  355.                 }
  356.                 set {
  357.                     this[this.table_Table.年龄Column] = value;
  358.                 }
  359.             }
  360.             
  361.             public string 性别 {
  362.                 get {
  363.                     try {
  364.                         return ((string)(this[this.table_Table.性别Column]));
  365.                     }
  366.                     catch (InvalidCastException e) {
  367.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  368.                     }
  369.                 }
  370.                 set {
  371.                     this[this.table_Table.性别Column] = value;
  372.                 }
  373.             }
  374.             
  375.             public bool Is姓名Null() {
  376.                 return this.IsNull(this.table_Table.姓名Column);
  377.             }
  378.             
  379.             public void Set姓名Null() {
  380.                 this[this.table_Table.姓名Column] = System.Convert.DBNull;
  381.             }
  382.             
  383.             public bool Is年龄Null() {
  384.                 return this.IsNull(this.table_Table.年龄Column);
  385.             }
  386.             
  387.             public void Set年龄Null() {
  388.                 this[this.table_Table.年龄Column] = System.Convert.DBNull;
  389.             }
  390.             
  391.             public bool Is性别Null() {
  392.                 return this.IsNull(this.table_Table.性别Column);
  393.             }
  394.             
  395.             public void Set性别Null() {
  396.                 this[this.table_Table.性别Column] = System.Convert.DBNull;
  397.             }
  398.         }
  399.         
  400.         [System.Diagnostics.DebuggerStepThrough()]
  401.         public class _TableRowChangeEvent : EventArgs {
  402.             
  403.             private _TableRow eventRow;
  404.             
  405.             private DataRowAction eventAction;
  406.             
  407.             public _TableRowChangeEvent(_TableRow row, DataRowAction action) {
  408.                 this.eventRow = row;
  409.                 this.eventAction = action;
  410.             }
  411.             
  412.             public _TableRow Row {
  413.                 get {
  414.                     return this.eventRow;
  415.                 }
  416.             }
  417.             
  418.             public DataRowAction Action {
  419.                 get {
  420.                     return this.eventAction;
  421.                 }
  422.             }
  423.         }
  424.     }
  425. }