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

医药行业

开发平台:

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 nan : DataSet {
  22.         
  23.         private _TableDataTable table_Table;
  24.         
  25.         public nan() {
  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 nan(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.             nan cln = ((nan)(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 = "nan";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/nan.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.             private DataColumn column疑难病况;
  146.             
  147.             private DataColumn column过敏药物;
  148.             
  149.             private DataColumn column医师;
  150.             
  151.             private DataColumn column上传日期;
  152.             
  153.             internal _TableDataTable() : 
  154.                     base("Table") {
  155.                 this.InitClass();
  156.             }
  157.             
  158.             internal _TableDataTable(DataTable table) : 
  159.                     base(table.TableName) {
  160.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  161.                     this.CaseSensitive = table.CaseSensitive;
  162.                 }
  163.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  164.                     this.Locale = table.Locale;
  165.                 }
  166.                 if ((table.Namespace != table.DataSet.Namespace)) {
  167.                     this.Namespace = table.Namespace;
  168.                 }
  169.                 this.Prefix = table.Prefix;
  170.                 this.MinimumCapacity = table.MinimumCapacity;
  171.                 this.DisplayExpression = table.DisplayExpression;
  172.             }
  173.             
  174.             [System.ComponentModel.Browsable(false)]
  175.             public int Count {
  176.                 get {
  177.                     return this.Rows.Count;
  178.                 }
  179.             }
  180.             
  181.             internal DataColumn 挂号号码Column {
  182.                 get {
  183.                     return this.column挂号号码;
  184.                 }
  185.             }
  186.             
  187.             internal DataColumn 姓名Column {
  188.                 get {
  189.                     return this.column姓名;
  190.                 }
  191.             }
  192.             
  193.             internal DataColumn 性别Column {
  194.                 get {
  195.                     return this.column性别;
  196.                 }
  197.             }
  198.             
  199.             internal DataColumn 年龄Column {
  200.                 get {
  201.                     return this.column年龄;
  202.                 }
  203.             }
  204.             
  205.             internal DataColumn 疑难病况Column {
  206.                 get {
  207.                     return this.column疑难病况;
  208.                 }
  209.             }
  210.             
  211.             internal DataColumn 过敏药物Column {
  212.                 get {
  213.                     return this.column过敏药物;
  214.                 }
  215.             }
  216.             
  217.             internal DataColumn 医师Column {
  218.                 get {
  219.                     return this.column医师;
  220.                 }
  221.             }
  222.             
  223.             internal DataColumn 上传日期Column {
  224.                 get {
  225.                     return this.column上传日期;
  226.                 }
  227.             }
  228.             
  229.             public _TableRow this[int index] {
  230.                 get {
  231.                     return ((_TableRow)(this.Rows[index]));
  232.                 }
  233.             }
  234.             
  235.             public event _TableRowChangeEventHandler _TableRowChanged;
  236.             
  237.             public event _TableRowChangeEventHandler _TableRowChanging;
  238.             
  239.             public event _TableRowChangeEventHandler _TableRowDeleted;
  240.             
  241.             public event _TableRowChangeEventHandler _TableRowDeleting;
  242.             
  243.             public void Add_TableRow(_TableRow row) {
  244.                 this.Rows.Add(row);
  245.             }
  246.             
  247.             public _TableRow Add_TableRow(string 挂号号码, string 姓名, string 性别, string 年龄, string 疑难病况, string 过敏药物, string 医师, System.DateTime 上传日期) {
  248.                 _TableRow row_TableRow = ((_TableRow)(this.NewRow()));
  249.                 row_TableRow.ItemArray = new object[] {
  250.                         挂号号码,
  251.                         姓名,
  252.                         性别,
  253.                         年龄,
  254.                         疑难病况,
  255.                         过敏药物,
  256.                         医师,
  257.                         上传日期};
  258.                 this.Rows.Add(row_TableRow);
  259.                 return row_TableRow;
  260.             }
  261.             
  262.             public _TableRow FindBy挂号号码(string 挂号号码) {
  263.                 return ((_TableRow)(this.Rows.Find(new object[] {
  264.                             挂号号码})));
  265.             }
  266.             
  267.             public System.Collections.IEnumerator GetEnumerator() {
  268.                 return this.Rows.GetEnumerator();
  269.             }
  270.             
  271.             public override DataTable Clone() {
  272.                 _TableDataTable cln = ((_TableDataTable)(base.Clone()));
  273.                 cln.InitVars();
  274.                 return cln;
  275.             }
  276.             
  277.             protected override DataTable CreateInstance() {
  278.                 return new _TableDataTable();
  279.             }
  280.             
  281.             internal void InitVars() {
  282.                 this.column挂号号码 = this.Columns["挂号号码"];
  283.                 this.column姓名 = this.Columns["姓名"];
  284.                 this.column性别 = this.Columns["性别"];
  285.                 this.column年龄 = this.Columns["年龄"];
  286.                 this.column疑难病况 = this.Columns["疑难病况"];
  287.                 this.column过敏药物 = this.Columns["过敏药物"];
  288.                 this.column医师 = this.Columns["医师"];
  289.                 this.column上传日期 = this.Columns["上传日期"];
  290.             }
  291.             
  292.             private void InitClass() {
  293.                 this.column挂号号码 = new DataColumn("挂号号码", typeof(string), null, System.Data.MappingType.Element);
  294.                 this.Columns.Add(this.column挂号号码);
  295.                 this.column姓名 = new DataColumn("姓名", typeof(string), null, System.Data.MappingType.Element);
  296.                 this.Columns.Add(this.column姓名);
  297.                 this.column性别 = new DataColumn("性别", typeof(string), null, System.Data.MappingType.Element);
  298.                 this.Columns.Add(this.column性别);
  299.                 this.column年龄 = new DataColumn("年龄", typeof(string), null, System.Data.MappingType.Element);
  300.                 this.Columns.Add(this.column年龄);
  301.                 this.column疑难病况 = new DataColumn("疑难病况", typeof(string), null, System.Data.MappingType.Element);
  302.                 this.Columns.Add(this.column疑难病况);
  303.                 this.column过敏药物 = new DataColumn("过敏药物", typeof(string), null, System.Data.MappingType.Element);
  304.                 this.Columns.Add(this.column过敏药物);
  305.                 this.column医师 = new DataColumn("医师", typeof(string), null, System.Data.MappingType.Element);
  306.                 this.Columns.Add(this.column医师);
  307.                 this.column上传日期 = new DataColumn("上传日期", typeof(System.DateTime), null, System.Data.MappingType.Element);
  308.                 this.Columns.Add(this.column上传日期);
  309.                 this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
  310.                                 this.column挂号号码}, true));
  311.                 this.column挂号号码.AllowDBNull = false;
  312.                 this.column挂号号码.Unique = true;
  313.             }
  314.             
  315.             public _TableRow New_TableRow() {
  316.                 return ((_TableRow)(this.NewRow()));
  317.             }
  318.             
  319.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  320.                 return new _TableRow(builder);
  321.             }
  322.             
  323.             protected override System.Type GetRowType() {
  324.                 return typeof(_TableRow);
  325.             }
  326.             
  327.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  328.                 base.OnRowChanged(e);
  329.                 if ((this._TableRowChanged != null)) {
  330.                     this._TableRowChanged(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  331.                 }
  332.             }
  333.             
  334.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  335.                 base.OnRowChanging(e);
  336.                 if ((this._TableRowChanging != null)) {
  337.                     this._TableRowChanging(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  338.                 }
  339.             }
  340.             
  341.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  342.                 base.OnRowDeleted(e);
  343.                 if ((this._TableRowDeleted != null)) {
  344.                     this._TableRowDeleted(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  345.                 }
  346.             }
  347.             
  348.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  349.                 base.OnRowDeleting(e);
  350.                 if ((this._TableRowDeleting != null)) {
  351.                     this._TableRowDeleting(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  352.                 }
  353.             }
  354.             
  355.             public void Remove_TableRow(_TableRow row) {
  356.                 this.Rows.Remove(row);
  357.             }
  358.         }
  359.         
  360.         [System.Diagnostics.DebuggerStepThrough()]
  361.         public class _TableRow : DataRow {
  362.             
  363.             private _TableDataTable table_Table;
  364.             
  365.             internal _TableRow(DataRowBuilder rb) : 
  366.                     base(rb) {
  367.                 this.table_Table = ((_TableDataTable)(this.Table));
  368.             }
  369.             
  370.             public string 挂号号码 {
  371.                 get {
  372.                     return ((string)(this[this.table_Table.挂号号码Column]));
  373.                 }
  374.                 set {
  375.                     this[this.table_Table.挂号号码Column] = value;
  376.                 }
  377.             }
  378.             
  379.             public string 姓名 {
  380.                 get {
  381.                     try {
  382.                         return ((string)(this[this.table_Table.姓名Column]));
  383.                     }
  384.                     catch (InvalidCastException e) {
  385.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  386.                     }
  387.                 }
  388.                 set {
  389.                     this[this.table_Table.姓名Column] = value;
  390.                 }
  391.             }
  392.             
  393.             public string 性别 {
  394.                 get {
  395.                     try {
  396.                         return ((string)(this[this.table_Table.性别Column]));
  397.                     }
  398.                     catch (InvalidCastException e) {
  399.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  400.                     }
  401.                 }
  402.                 set {
  403.                     this[this.table_Table.性别Column] = value;
  404.                 }
  405.             }
  406.             
  407.             public string 年龄 {
  408.                 get {
  409.                     try {
  410.                         return ((string)(this[this.table_Table.年龄Column]));
  411.                     }
  412.                     catch (InvalidCastException e) {
  413.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  414.                     }
  415.                 }
  416.                 set {
  417.                     this[this.table_Table.年龄Column] = value;
  418.                 }
  419.             }
  420.             
  421.             public string 疑难病况 {
  422.                 get {
  423.                     try {
  424.                         return ((string)(this[this.table_Table.疑难病况Column]));
  425.                     }
  426.                     catch (InvalidCastException e) {
  427.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  428.                     }
  429.                 }
  430.                 set {
  431.                     this[this.table_Table.疑难病况Column] = value;
  432.                 }
  433.             }
  434.             
  435.             public string 过敏药物 {
  436.                 get {
  437.                     try {
  438.                         return ((string)(this[this.table_Table.过敏药物Column]));
  439.                     }
  440.                     catch (InvalidCastException e) {
  441.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  442.                     }
  443.                 }
  444.                 set {
  445.                     this[this.table_Table.过敏药物Column] = value;
  446.                 }
  447.             }
  448.             
  449.             public string 医师 {
  450.                 get {
  451.                     try {
  452.                         return ((string)(this[this.table_Table.医师Column]));
  453.                     }
  454.                     catch (InvalidCastException e) {
  455.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  456.                     }
  457.                 }
  458.                 set {
  459.                     this[this.table_Table.医师Column] = value;
  460.                 }
  461.             }
  462.             
  463.             public System.DateTime 上传日期 {
  464.                 get {
  465.                     try {
  466.                         return ((System.DateTime)(this[this.table_Table.上传日期Column]));
  467.                     }
  468.                     catch (InvalidCastException e) {
  469.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  470.                     }
  471.                 }
  472.                 set {
  473.                     this[this.table_Table.上传日期Column] = value;
  474.                 }
  475.             }
  476.             
  477.             public bool Is姓名Null() {
  478.                 return this.IsNull(this.table_Table.姓名Column);
  479.             }
  480.             
  481.             public void Set姓名Null() {
  482.                 this[this.table_Table.姓名Column] = System.Convert.DBNull;
  483.             }
  484.             
  485.             public bool Is性别Null() {
  486.                 return this.IsNull(this.table_Table.性别Column);
  487.             }
  488.             
  489.             public void Set性别Null() {
  490.                 this[this.table_Table.性别Column] = System.Convert.DBNull;
  491.             }
  492.             
  493.             public bool Is年龄Null() {
  494.                 return this.IsNull(this.table_Table.年龄Column);
  495.             }
  496.             
  497.             public void Set年龄Null() {
  498.                 this[this.table_Table.年龄Column] = System.Convert.DBNull;
  499.             }
  500.             
  501.             public bool Is疑难病况Null() {
  502.                 return this.IsNull(this.table_Table.疑难病况Column);
  503.             }
  504.             
  505.             public void Set疑难病况Null() {
  506.                 this[this.table_Table.疑难病况Column] = System.Convert.DBNull;
  507.             }
  508.             
  509.             public bool Is过敏药物Null() {
  510.                 return this.IsNull(this.table_Table.过敏药物Column);
  511.             }
  512.             
  513.             public void Set过敏药物Null() {
  514.                 this[this.table_Table.过敏药物Column] = System.Convert.DBNull;
  515.             }
  516.             
  517.             public bool Is医师Null() {
  518.                 return this.IsNull(this.table_Table.医师Column);
  519.             }
  520.             
  521.             public void Set医师Null() {
  522.                 this[this.table_Table.医师Column] = System.Convert.DBNull;
  523.             }
  524.             
  525.             public bool Is上传日期Null() {
  526.                 return this.IsNull(this.table_Table.上传日期Column);
  527.             }
  528.             
  529.             public void Set上传日期Null() {
  530.                 this[this.table_Table.上传日期Column] = System.Convert.DBNull;
  531.             }
  532.         }
  533.         
  534.         [System.Diagnostics.DebuggerStepThrough()]
  535.         public class _TableRowChangeEvent : EventArgs {
  536.             
  537.             private _TableRow eventRow;
  538.             
  539.             private DataRowAction eventAction;
  540.             
  541.             public _TableRowChangeEvent(_TableRow row, DataRowAction action) {
  542.                 this.eventRow = row;
  543.                 this.eventAction = action;
  544.             }
  545.             
  546.             public _TableRow Row {
  547.                 get {
  548.                     return this.eventRow;
  549.                 }
  550.             }
  551.             
  552.             public DataRowAction Action {
  553.                 get {
  554.                     return this.eventAction;
  555.                 }
  556.             }
  557.         }
  558.     }
  559. }