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

医药行业

开发平台:

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 dss : DataSet {
  22.         
  23.         private _TableDataTable table_Table;
  24.         
  25.         public dss() {
  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 dss(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.             dss cln = ((dss)(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 = "dss";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/dss.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.             private DataColumn column日期;
  154.             
  155.             internal _TableDataTable() : 
  156.                     base("Table") {
  157.                 this.InitClass();
  158.             }
  159.             
  160.             internal _TableDataTable(DataTable table) : 
  161.                     base(table.TableName) {
  162.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  163.                     this.CaseSensitive = table.CaseSensitive;
  164.                 }
  165.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  166.                     this.Locale = table.Locale;
  167.                 }
  168.                 if ((table.Namespace != table.DataSet.Namespace)) {
  169.                     this.Namespace = table.Namespace;
  170.                 }
  171.                 this.Prefix = table.Prefix;
  172.                 this.MinimumCapacity = table.MinimumCapacity;
  173.                 this.DisplayExpression = table.DisplayExpression;
  174.             }
  175.             
  176.             [System.ComponentModel.Browsable(false)]
  177.             public int Count {
  178.                 get {
  179.                     return this.Rows.Count;
  180.                 }
  181.             }
  182.             
  183.             internal DataColumn 挂号号码Column {
  184.                 get {
  185.                     return this.column挂号号码;
  186.                 }
  187.             }
  188.             
  189.             internal DataColumn 姓名Column {
  190.                 get {
  191.                     return this.column姓名;
  192.                 }
  193.             }
  194.             
  195.             internal DataColumn 年龄Column {
  196.                 get {
  197.                     return this.column年龄;
  198.                 }
  199.             }
  200.             
  201.             internal DataColumn 性别Column {
  202.                 get {
  203.                     return this.column性别;
  204.                 }
  205.             }
  206.             
  207.             internal DataColumn 类型Column {
  208.                 get {
  209.                     return this.column类型;
  210.                 }
  211.             }
  212.             
  213.             internal DataColumn 挂号费用Column {
  214.                 get {
  215.                     return this.column挂号费用;
  216.                 }
  217.             }
  218.             
  219.             internal DataColumn 病历Column {
  220.                 get {
  221.                     return this.column病历;
  222.                 }
  223.             }
  224.             
  225.             internal DataColumn 地址Column {
  226.                 get {
  227.                     return this.column地址;
  228.                 }
  229.             }
  230.             
  231.             internal DataColumn 日期Column {
  232.                 get {
  233.                     return this.column日期;
  234.                 }
  235.             }
  236.             
  237.             public _TableRow this[int index] {
  238.                 get {
  239.                     return ((_TableRow)(this.Rows[index]));
  240.                 }
  241.             }
  242.             
  243.             public event _TableRowChangeEventHandler _TableRowChanged;
  244.             
  245.             public event _TableRowChangeEventHandler _TableRowChanging;
  246.             
  247.             public event _TableRowChangeEventHandler _TableRowDeleted;
  248.             
  249.             public event _TableRowChangeEventHandler _TableRowDeleting;
  250.             
  251.             public void Add_TableRow(_TableRow row) {
  252.                 this.Rows.Add(row);
  253.             }
  254.             
  255.             public _TableRow Add_TableRow(string 姓名, string 年龄, string 性别, string 类型, string 挂号费用, string 病历, string 地址, System.DateTime 日期) {
  256.                 _TableRow row_TableRow = ((_TableRow)(this.NewRow()));
  257.                 row_TableRow.ItemArray = new object[] {
  258.                         null,
  259.                         姓名,
  260.                         年龄,
  261.                         性别,
  262.                         类型,
  263.                         挂号费用,
  264.                         病历,
  265.                         地址,
  266.                         日期};
  267.                 this.Rows.Add(row_TableRow);
  268.                 return row_TableRow;
  269.             }
  270.             
  271.             public _TableRow FindBy挂号号码(long 挂号号码) {
  272.                 return ((_TableRow)(this.Rows.Find(new object[] {
  273.                             挂号号码})));
  274.             }
  275.             
  276.             public System.Collections.IEnumerator GetEnumerator() {
  277.                 return this.Rows.GetEnumerator();
  278.             }
  279.             
  280.             public override DataTable Clone() {
  281.                 _TableDataTable cln = ((_TableDataTable)(base.Clone()));
  282.                 cln.InitVars();
  283.                 return cln;
  284.             }
  285.             
  286.             protected override DataTable CreateInstance() {
  287.                 return new _TableDataTable();
  288.             }
  289.             
  290.             internal void InitVars() {
  291.                 this.column挂号号码 = this.Columns["挂号号码"];
  292.                 this.column姓名 = this.Columns["姓名"];
  293.                 this.column年龄 = this.Columns["年龄"];
  294.                 this.column性别 = this.Columns["性别"];
  295.                 this.column类型 = this.Columns["类型"];
  296.                 this.column挂号费用 = this.Columns["挂号费用"];
  297.                 this.column病历 = this.Columns["病历"];
  298.                 this.column地址 = this.Columns["地址"];
  299.                 this.column日期 = this.Columns["日期"];
  300.             }
  301.             
  302.             private void InitClass() {
  303.                 this.column挂号号码 = new DataColumn("挂号号码", typeof(long), 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(string), null, System.Data.MappingType.Element);
  308.                 this.Columns.Add(this.column年龄);
  309.                 this.column性别 = new DataColumn("性别", typeof(string), null, System.Data.MappingType.Element);
  310.                 this.Columns.Add(this.column性别);
  311.                 this.column类型 = new DataColumn("类型", typeof(string), null, System.Data.MappingType.Element);
  312.                 this.Columns.Add(this.column类型);
  313.                 this.column挂号费用 = new DataColumn("挂号费用", typeof(string), null, System.Data.MappingType.Element);
  314.                 this.Columns.Add(this.column挂号费用);
  315.                 this.column病历 = new DataColumn("病历", typeof(string), null, System.Data.MappingType.Element);
  316.                 this.Columns.Add(this.column病历);
  317.                 this.column地址 = new DataColumn("地址", typeof(string), null, System.Data.MappingType.Element);
  318.                 this.Columns.Add(this.column地址);
  319.                 this.column日期 = new DataColumn("日期", typeof(System.DateTime), null, System.Data.MappingType.Element);
  320.                 this.Columns.Add(this.column日期);
  321.                 this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
  322.                                 this.column挂号号码}, true));
  323.                 this.column挂号号码.AutoIncrement = true;
  324.                 this.column挂号号码.AllowDBNull = false;
  325.                 this.column挂号号码.ReadOnly = true;
  326.                 this.column挂号号码.Unique = true;
  327.             }
  328.             
  329.             public _TableRow New_TableRow() {
  330.                 return ((_TableRow)(this.NewRow()));
  331.             }
  332.             
  333.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  334.                 return new _TableRow(builder);
  335.             }
  336.             
  337.             protected override System.Type GetRowType() {
  338.                 return typeof(_TableRow);
  339.             }
  340.             
  341.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  342.                 base.OnRowChanged(e);
  343.                 if ((this._TableRowChanged != null)) {
  344.                     this._TableRowChanged(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  345.                 }
  346.             }
  347.             
  348.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  349.                 base.OnRowChanging(e);
  350.                 if ((this._TableRowChanging != null)) {
  351.                     this._TableRowChanging(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  352.                 }
  353.             }
  354.             
  355.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  356.                 base.OnRowDeleted(e);
  357.                 if ((this._TableRowDeleted != null)) {
  358.                     this._TableRowDeleted(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  359.                 }
  360.             }
  361.             
  362.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  363.                 base.OnRowDeleting(e);
  364.                 if ((this._TableRowDeleting != null)) {
  365.                     this._TableRowDeleting(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  366.                 }
  367.             }
  368.             
  369.             public void Remove_TableRow(_TableRow row) {
  370.                 this.Rows.Remove(row);
  371.             }
  372.         }
  373.         
  374.         [System.Diagnostics.DebuggerStepThrough()]
  375.         public class _TableRow : DataRow {
  376.             
  377.             private _TableDataTable table_Table;
  378.             
  379.             internal _TableRow(DataRowBuilder rb) : 
  380.                     base(rb) {
  381.                 this.table_Table = ((_TableDataTable)(this.Table));
  382.             }
  383.             
  384.             public long 挂号号码 {
  385.                 get {
  386.                     return ((long)(this[this.table_Table.挂号号码Column]));
  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 string 病历 {
  464.                 get {
  465.                     try {
  466.                         return ((string)(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 string 地址 {
  478.                 get {
  479.                     try {
  480.                         return ((string)(this[this.table_Table.地址Column]));
  481.                     }
  482.                     catch (InvalidCastException e) {
  483.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  484.                     }
  485.                 }
  486.                 set {
  487.                     this[this.table_Table.地址Column] = value;
  488.                 }
  489.             }
  490.             
  491.             public System.DateTime 日期 {
  492.                 get {
  493.                     try {
  494.                         return ((System.DateTime)(this[this.table_Table.日期Column]));
  495.                     }
  496.                     catch (InvalidCastException e) {
  497.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  498.                     }
  499.                 }
  500.                 set {
  501.                     this[this.table_Table.日期Column] = value;
  502.                 }
  503.             }
  504.             
  505.             public bool Is姓名Null() {
  506.                 return this.IsNull(this.table_Table.姓名Column);
  507.             }
  508.             
  509.             public void Set姓名Null() {
  510.                 this[this.table_Table.姓名Column] = System.Convert.DBNull;
  511.             }
  512.             
  513.             public bool Is年龄Null() {
  514.                 return this.IsNull(this.table_Table.年龄Column);
  515.             }
  516.             
  517.             public void Set年龄Null() {
  518.                 this[this.table_Table.年龄Column] = System.Convert.DBNull;
  519.             }
  520.             
  521.             public bool Is性别Null() {
  522.                 return this.IsNull(this.table_Table.性别Column);
  523.             }
  524.             
  525.             public void Set性别Null() {
  526.                 this[this.table_Table.性别Column] = System.Convert.DBNull;
  527.             }
  528.             
  529.             public bool Is类型Null() {
  530.                 return this.IsNull(this.table_Table.类型Column);
  531.             }
  532.             
  533.             public void Set类型Null() {
  534.                 this[this.table_Table.类型Column] = System.Convert.DBNull;
  535.             }
  536.             
  537.             public bool Is挂号费用Null() {
  538.                 return this.IsNull(this.table_Table.挂号费用Column);
  539.             }
  540.             
  541.             public void Set挂号费用Null() {
  542.                 this[this.table_Table.挂号费用Column] = System.Convert.DBNull;
  543.             }
  544.             
  545.             public bool Is病历Null() {
  546.                 return this.IsNull(this.table_Table.病历Column);
  547.             }
  548.             
  549.             public void Set病历Null() {
  550.                 this[this.table_Table.病历Column] = System.Convert.DBNull;
  551.             }
  552.             
  553.             public bool Is地址Null() {
  554.                 return this.IsNull(this.table_Table.地址Column);
  555.             }
  556.             
  557.             public void Set地址Null() {
  558.                 this[this.table_Table.地址Column] = System.Convert.DBNull;
  559.             }
  560.             
  561.             public bool Is日期Null() {
  562.                 return this.IsNull(this.table_Table.日期Column);
  563.             }
  564.             
  565.             public void Set日期Null() {
  566.                 this[this.table_Table.日期Column] = System.Convert.DBNull;
  567.             }
  568.         }
  569.         
  570.         [System.Diagnostics.DebuggerStepThrough()]
  571.         public class _TableRowChangeEvent : EventArgs {
  572.             
  573.             private _TableRow eventRow;
  574.             
  575.             private DataRowAction eventAction;
  576.             
  577.             public _TableRowChangeEvent(_TableRow row, DataRowAction action) {
  578.                 this.eventRow = row;
  579.                 this.eventAction = action;
  580.             }
  581.             
  582.             public _TableRow Row {
  583.                 get {
  584.                     return this.eventRow;
  585.                 }
  586.             }
  587.             
  588.             public DataRowAction Action {
  589.                 get {
  590.                     return this.eventAction;
  591.                 }
  592.             }
  593.         }
  594.     }
  595. }