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

医药行业

开发平台:

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 sela : DataSet {
  22.         
  23.         private _TableDataTable table_Table;
  24.         
  25.         public sela() {
  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 sela(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.             sela cln = ((sela)(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 = "sela";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/sela.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 columnuseid;
  138.             
  139.             private DataColumn columnusename;
  140.             
  141.             private DataColumn columnpwd;
  142.             
  143.             private DataColumn columnsex;
  144.             
  145.             private DataColumn columnaddr;
  146.             
  147.             private DataColumn columnphone;
  148.             
  149.             internal _TableDataTable() : 
  150.                     base("Table") {
  151.                 this.InitClass();
  152.             }
  153.             
  154.             internal _TableDataTable(DataTable table) : 
  155.                     base(table.TableName) {
  156.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  157.                     this.CaseSensitive = table.CaseSensitive;
  158.                 }
  159.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  160.                     this.Locale = table.Locale;
  161.                 }
  162.                 if ((table.Namespace != table.DataSet.Namespace)) {
  163.                     this.Namespace = table.Namespace;
  164.                 }
  165.                 this.Prefix = table.Prefix;
  166.                 this.MinimumCapacity = table.MinimumCapacity;
  167.                 this.DisplayExpression = table.DisplayExpression;
  168.             }
  169.             
  170.             [System.ComponentModel.Browsable(false)]
  171.             public int Count {
  172.                 get {
  173.                     return this.Rows.Count;
  174.                 }
  175.             }
  176.             
  177.             internal DataColumn useidColumn {
  178.                 get {
  179.                     return this.columnuseid;
  180.                 }
  181.             }
  182.             
  183.             internal DataColumn usenameColumn {
  184.                 get {
  185.                     return this.columnusename;
  186.                 }
  187.             }
  188.             
  189.             internal DataColumn pwdColumn {
  190.                 get {
  191.                     return this.columnpwd;
  192.                 }
  193.             }
  194.             
  195.             internal DataColumn sexColumn {
  196.                 get {
  197.                     return this.columnsex;
  198.                 }
  199.             }
  200.             
  201.             internal DataColumn addrColumn {
  202.                 get {
  203.                     return this.columnaddr;
  204.                 }
  205.             }
  206.             
  207.             internal DataColumn phoneColumn {
  208.                 get {
  209.                     return this.columnphone;
  210.                 }
  211.             }
  212.             
  213.             public _TableRow this[int index] {
  214.                 get {
  215.                     return ((_TableRow)(this.Rows[index]));
  216.                 }
  217.             }
  218.             
  219.             public event _TableRowChangeEventHandler _TableRowChanged;
  220.             
  221.             public event _TableRowChangeEventHandler _TableRowChanging;
  222.             
  223.             public event _TableRowChangeEventHandler _TableRowDeleted;
  224.             
  225.             public event _TableRowChangeEventHandler _TableRowDeleting;
  226.             
  227.             public void Add_TableRow(_TableRow row) {
  228.                 this.Rows.Add(row);
  229.             }
  230.             
  231.             public _TableRow Add_TableRow(string useid, string usename, string pwd, string sex, string addr, string phone) {
  232.                 _TableRow row_TableRow = ((_TableRow)(this.NewRow()));
  233.                 row_TableRow.ItemArray = new object[] {
  234.                         useid,
  235.                         usename,
  236.                         pwd,
  237.                         sex,
  238.                         addr,
  239.                         phone};
  240.                 this.Rows.Add(row_TableRow);
  241.                 return row_TableRow;
  242.             }
  243.             
  244.             public _TableRow FindByuseid(string useid) {
  245.                 return ((_TableRow)(this.Rows.Find(new object[] {
  246.                             useid})));
  247.             }
  248.             
  249.             public System.Collections.IEnumerator GetEnumerator() {
  250.                 return this.Rows.GetEnumerator();
  251.             }
  252.             
  253.             public override DataTable Clone() {
  254.                 _TableDataTable cln = ((_TableDataTable)(base.Clone()));
  255.                 cln.InitVars();
  256.                 return cln;
  257.             }
  258.             
  259.             protected override DataTable CreateInstance() {
  260.                 return new _TableDataTable();
  261.             }
  262.             
  263.             internal void InitVars() {
  264.                 this.columnuseid = this.Columns["useid"];
  265.                 this.columnusename = this.Columns["usename"];
  266.                 this.columnpwd = this.Columns["pwd"];
  267.                 this.columnsex = this.Columns["sex"];
  268.                 this.columnaddr = this.Columns["addr"];
  269.                 this.columnphone = this.Columns["phone"];
  270.             }
  271.             
  272.             private void InitClass() {
  273.                 this.columnuseid = new DataColumn("useid", typeof(string), null, System.Data.MappingType.Element);
  274.                 this.Columns.Add(this.columnuseid);
  275.                 this.columnusename = new DataColumn("usename", typeof(string), null, System.Data.MappingType.Element);
  276.                 this.Columns.Add(this.columnusename);
  277.                 this.columnpwd = new DataColumn("pwd", typeof(string), null, System.Data.MappingType.Element);
  278.                 this.Columns.Add(this.columnpwd);
  279.                 this.columnsex = new DataColumn("sex", typeof(string), null, System.Data.MappingType.Element);
  280.                 this.Columns.Add(this.columnsex);
  281.                 this.columnaddr = new DataColumn("addr", typeof(string), null, System.Data.MappingType.Element);
  282.                 this.Columns.Add(this.columnaddr);
  283.                 this.columnphone = new DataColumn("phone", typeof(string), null, System.Data.MappingType.Element);
  284.                 this.Columns.Add(this.columnphone);
  285.                 this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
  286.                                 this.columnuseid}, true));
  287.                 this.columnuseid.AllowDBNull = false;
  288.                 this.columnuseid.Unique = true;
  289.             }
  290.             
  291.             public _TableRow New_TableRow() {
  292.                 return ((_TableRow)(this.NewRow()));
  293.             }
  294.             
  295.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  296.                 return new _TableRow(builder);
  297.             }
  298.             
  299.             protected override System.Type GetRowType() {
  300.                 return typeof(_TableRow);
  301.             }
  302.             
  303.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  304.                 base.OnRowChanged(e);
  305.                 if ((this._TableRowChanged != null)) {
  306.                     this._TableRowChanged(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  307.                 }
  308.             }
  309.             
  310.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  311.                 base.OnRowChanging(e);
  312.                 if ((this._TableRowChanging != null)) {
  313.                     this._TableRowChanging(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  314.                 }
  315.             }
  316.             
  317.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  318.                 base.OnRowDeleted(e);
  319.                 if ((this._TableRowDeleted != null)) {
  320.                     this._TableRowDeleted(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  321.                 }
  322.             }
  323.             
  324.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  325.                 base.OnRowDeleting(e);
  326.                 if ((this._TableRowDeleting != null)) {
  327.                     this._TableRowDeleting(this, new _TableRowChangeEvent(((_TableRow)(e.Row)), e.Action));
  328.                 }
  329.             }
  330.             
  331.             public void Remove_TableRow(_TableRow row) {
  332.                 this.Rows.Remove(row);
  333.             }
  334.         }
  335.         
  336.         [System.Diagnostics.DebuggerStepThrough()]
  337.         public class _TableRow : DataRow {
  338.             
  339.             private _TableDataTable table_Table;
  340.             
  341.             internal _TableRow(DataRowBuilder rb) : 
  342.                     base(rb) {
  343.                 this.table_Table = ((_TableDataTable)(this.Table));
  344.             }
  345.             
  346.             public string useid {
  347.                 get {
  348.                     return ((string)(this[this.table_Table.useidColumn]));
  349.                 }
  350.                 set {
  351.                     this[this.table_Table.useidColumn] = value;
  352.                 }
  353.             }
  354.             
  355.             public string usename {
  356.                 get {
  357.                     try {
  358.                         return ((string)(this[this.table_Table.usenameColumn]));
  359.                     }
  360.                     catch (InvalidCastException e) {
  361.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  362.                     }
  363.                 }
  364.                 set {
  365.                     this[this.table_Table.usenameColumn] = value;
  366.                 }
  367.             }
  368.             
  369.             public string pwd {
  370.                 get {
  371.                     try {
  372.                         return ((string)(this[this.table_Table.pwdColumn]));
  373.                     }
  374.                     catch (InvalidCastException e) {
  375.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  376.                     }
  377.                 }
  378.                 set {
  379.                     this[this.table_Table.pwdColumn] = value;
  380.                 }
  381.             }
  382.             
  383.             public string sex {
  384.                 get {
  385.                     try {
  386.                         return ((string)(this[this.table_Table.sexColumn]));
  387.                     }
  388.                     catch (InvalidCastException e) {
  389.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  390.                     }
  391.                 }
  392.                 set {
  393.                     this[this.table_Table.sexColumn] = value;
  394.                 }
  395.             }
  396.             
  397.             public string addr {
  398.                 get {
  399.                     try {
  400.                         return ((string)(this[this.table_Table.addrColumn]));
  401.                     }
  402.                     catch (InvalidCastException e) {
  403.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  404.                     }
  405.                 }
  406.                 set {
  407.                     this[this.table_Table.addrColumn] = value;
  408.                 }
  409.             }
  410.             
  411.             public string phone {
  412.                 get {
  413.                     try {
  414.                         return ((string)(this[this.table_Table.phoneColumn]));
  415.                     }
  416.                     catch (InvalidCastException e) {
  417.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  418.                     }
  419.                 }
  420.                 set {
  421.                     this[this.table_Table.phoneColumn] = value;
  422.                 }
  423.             }
  424.             
  425.             public bool IsusenameNull() {
  426.                 return this.IsNull(this.table_Table.usenameColumn);
  427.             }
  428.             
  429.             public void SetusenameNull() {
  430.                 this[this.table_Table.usenameColumn] = System.Convert.DBNull;
  431.             }
  432.             
  433.             public bool IspwdNull() {
  434.                 return this.IsNull(this.table_Table.pwdColumn);
  435.             }
  436.             
  437.             public void SetpwdNull() {
  438.                 this[this.table_Table.pwdColumn] = System.Convert.DBNull;
  439.             }
  440.             
  441.             public bool IssexNull() {
  442.                 return this.IsNull(this.table_Table.sexColumn);
  443.             }
  444.             
  445.             public void SetsexNull() {
  446.                 this[this.table_Table.sexColumn] = System.Convert.DBNull;
  447.             }
  448.             
  449.             public bool IsaddrNull() {
  450.                 return this.IsNull(this.table_Table.addrColumn);
  451.             }
  452.             
  453.             public void SetaddrNull() {
  454.                 this[this.table_Table.addrColumn] = System.Convert.DBNull;
  455.             }
  456.             
  457.             public bool IsphoneNull() {
  458.                 return this.IsNull(this.table_Table.phoneColumn);
  459.             }
  460.             
  461.             public void SetphoneNull() {
  462.                 this[this.table_Table.phoneColumn] = System.Convert.DBNull;
  463.             }
  464.         }
  465.         
  466.         [System.Diagnostics.DebuggerStepThrough()]
  467.         public class _TableRowChangeEvent : EventArgs {
  468.             
  469.             private _TableRow eventRow;
  470.             
  471.             private DataRowAction eventAction;
  472.             
  473.             public _TableRowChangeEvent(_TableRow row, DataRowAction action) {
  474.                 this.eventRow = row;
  475.                 this.eventAction = action;
  476.             }
  477.             
  478.             public _TableRow Row {
  479.                 get {
  480.                     return this.eventRow;
  481.                 }
  482.             }
  483.             
  484.             public DataRowAction Action {
  485.                 get {
  486.                     return this.eventAction;
  487.                 }
  488.             }
  489.         }
  490.     }
  491. }