DataSet1.cs
上传用户:hjieqiu
上传日期:2013-05-11
资源大小:16494k
文件大小:21k
源码类别:

企业管理

开发平台:

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 DataSet1 : DataSet {
  22.         
  23.         private 科目表DataTable table科目表;
  24.         
  25.         public DataSet1() {
  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 DataSet1(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["科目表"] != null)) {
  38.                     this.Tables.Add(new 科目表DataTable(ds.Tables["科目表"]));
  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 科目表DataTable 科目表 {
  61.             get {
  62.                 return this.table科目表;
  63.             }
  64.         }
  65.         
  66.         public override DataSet Clone() {
  67.             DataSet1 cln = ((DataSet1)(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["科目表"] != null)) {
  85.                 this.Tables.Add(new 科目表DataTable(ds.Tables["科目表"]));
  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科目表 = ((科目表DataTable)(this.Tables["科目表"]));
  106.             if ((this.table科目表 != null)) {
  107.                 this.table科目表.InitVars();
  108.             }
  109.         }
  110.         
  111.         private void InitClass() {
  112.             this.DataSetName = "DataSet1";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/DataSet1.xsd";
  115.             this.Locale = new System.Globalization.CultureInfo("zh-CN");
  116.             this.CaseSensitive = false;
  117.             this.EnforceConstraints = true;
  118.             this.table科目表 = new 科目表DataTable();
  119.             this.Tables.Add(this.table科目表);
  120.         }
  121.         
  122.         private bool ShouldSerialize科目表() {
  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 科目表RowChangeEventHandler(object sender, 科目表RowChangeEvent e);
  133.         
  134.         [System.Diagnostics.DebuggerStepThrough()]
  135.         public class 科目表DataTable : 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.             internal 科目表DataTable() : 
  152.                     base("科目表") {
  153.                 this.InitClass();
  154.             }
  155.             
  156.             internal 科目表DataTable(DataTable table) : 
  157.                     base(table.TableName) {
  158.                 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
  159.                     this.CaseSensitive = table.CaseSensitive;
  160.                 }
  161.                 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
  162.                     this.Locale = table.Locale;
  163.                 }
  164.                 if ((table.Namespace != table.DataSet.Namespace)) {
  165.                     this.Namespace = table.Namespace;
  166.                 }
  167.                 this.Prefix = table.Prefix;
  168.                 this.MinimumCapacity = table.MinimumCapacity;
  169.                 this.DisplayExpression = table.DisplayExpression;
  170.             }
  171.             
  172.             [System.ComponentModel.Browsable(false)]
  173.             public int Count {
  174.                 get {
  175.                     return this.Rows.Count;
  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.             internal DataColumn 科目类别Column {
  198.                 get {
  199.                     return this.column科目类别;
  200.                 }
  201.             }
  202.             
  203.             internal DataColumn 是否存货科目Column {
  204.                 get {
  205.                     return this.column是否存货科目;
  206.                 }
  207.             }
  208.             
  209.             internal DataColumn 余额方向Column {
  210.                 get {
  211.                     return this.column余额方向;
  212.                 }
  213.             }
  214.             
  215.             internal DataColumn 数量单位Column {
  216.                 get {
  217.                     return this.column数量单位;
  218.                 }
  219.             }
  220.             
  221.             public 科目表Row this[int index] {
  222.                 get {
  223.                     return ((科目表Row)(this.Rows[index]));
  224.                 }
  225.             }
  226.             
  227.             public event 科目表RowChangeEventHandler 科目表RowChanged;
  228.             
  229.             public event 科目表RowChangeEventHandler 科目表RowChanging;
  230.             
  231.             public event 科目表RowChangeEventHandler 科目表RowDeleted;
  232.             
  233.             public event 科目表RowChangeEventHandler 科目表RowDeleting;
  234.             
  235.             public void Add科目表Row(科目表Row row) {
  236.                 this.Rows.Add(row);
  237.             }
  238.             
  239.             public 科目表Row Add科目表Row(string 科目代码, string 科目名称, string 助记码, string 科目类别, string 是否存货科目, string 余额方向, string 数量单位) {
  240.                 科目表Row row科目表Row = ((科目表Row)(this.NewRow()));
  241.                 row科目表Row.ItemArray = new object[] {
  242.                         科目代码,
  243.                         科目名称,
  244.                         助记码,
  245.                         科目类别,
  246.                         是否存货科目,
  247.                         余额方向,
  248.                         数量单位};
  249.                 this.Rows.Add(row科目表Row);
  250.                 return row科目表Row;
  251.             }
  252.             
  253.             public 科目表Row FindBy科目代码(string 科目代码) {
  254.                 return ((科目表Row)(this.Rows.Find(new object[] {
  255.                             科目代码})));
  256.             }
  257.             
  258.             public System.Collections.IEnumerator GetEnumerator() {
  259.                 return this.Rows.GetEnumerator();
  260.             }
  261.             
  262.             public override DataTable Clone() {
  263.                 科目表DataTable cln = ((科目表DataTable)(base.Clone()));
  264.                 cln.InitVars();
  265.                 return cln;
  266.             }
  267.             
  268.             protected override DataTable CreateInstance() {
  269.                 return new 科目表DataTable();
  270.             }
  271.             
  272.             internal void InitVars() {
  273.                 this.column科目代码 = this.Columns["科目代码"];
  274.                 this.column科目名称 = this.Columns["科目名称"];
  275.                 this.column助记码 = this.Columns["助记码"];
  276.                 this.column科目类别 = this.Columns["科目类别"];
  277.                 this.column是否存货科目 = this.Columns["是否存货科目"];
  278.                 this.column余额方向 = this.Columns["余额方向"];
  279.                 this.column数量单位 = this.Columns["数量单位"];
  280.             }
  281.             
  282.             private void InitClass() {
  283.                 this.column科目代码 = new DataColumn("科目代码", typeof(string), null, System.Data.MappingType.Element);
  284.                 this.Columns.Add(this.column科目代码);
  285.                 this.column科目名称 = new DataColumn("科目名称", typeof(string), null, System.Data.MappingType.Element);
  286.                 this.Columns.Add(this.column科目名称);
  287.                 this.column助记码 = new DataColumn("助记码", typeof(string), null, System.Data.MappingType.Element);
  288.                 this.Columns.Add(this.column助记码);
  289.                 this.column科目类别 = new DataColumn("科目类别", typeof(string), null, System.Data.MappingType.Element);
  290.                 this.Columns.Add(this.column科目类别);
  291.                 this.column是否存货科目 = new DataColumn("是否存货科目", typeof(string), null, System.Data.MappingType.Element);
  292.                 this.Columns.Add(this.column是否存货科目);
  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.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
  298.                                 this.column科目代码}, true));
  299.                 this.column科目代码.AllowDBNull = false;
  300.                 this.column科目代码.Unique = true;
  301.             }
  302.             
  303.             public 科目表Row New科目表Row() {
  304.                 return ((科目表Row)(this.NewRow()));
  305.             }
  306.             
  307.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  308.                 return new 科目表Row(builder);
  309.             }
  310.             
  311.             protected override System.Type GetRowType() {
  312.                 return typeof(科目表Row);
  313.             }
  314.             
  315.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  316.                 base.OnRowChanged(e);
  317.                 if ((this.科目表RowChanged != null)) {
  318.                     this.科目表RowChanged(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
  319.                 }
  320.             }
  321.             
  322.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  323.                 base.OnRowChanging(e);
  324.                 if ((this.科目表RowChanging != null)) {
  325.                     this.科目表RowChanging(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
  326.                 }
  327.             }
  328.             
  329.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  330.                 base.OnRowDeleted(e);
  331.                 if ((this.科目表RowDeleted != null)) {
  332.                     this.科目表RowDeleted(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
  333.                 }
  334.             }
  335.             
  336.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  337.                 base.OnRowDeleting(e);
  338.                 if ((this.科目表RowDeleting != null)) {
  339.                     this.科目表RowDeleting(this, new 科目表RowChangeEvent(((科目表Row)(e.Row)), e.Action));
  340.                 }
  341.             }
  342.             
  343.             public void Remove科目表Row(科目表Row row) {
  344.                 this.Rows.Remove(row);
  345.             }
  346.         }
  347.         
  348.         [System.Diagnostics.DebuggerStepThrough()]
  349.         public class 科目表Row : DataRow {
  350.             
  351.             private 科目表DataTable table科目表;
  352.             
  353.             internal 科目表Row(DataRowBuilder rb) : 
  354.                     base(rb) {
  355.                 this.table科目表 = ((科目表DataTable)(this.Table));
  356.             }
  357.             
  358.             public string 科目代码 {
  359.                 get {
  360.                     return ((string)(this[this.table科目表.科目代码Column]));
  361.                 }
  362.                 set {
  363.                     this[this.table科目表.科目代码Column] = value;
  364.                 }
  365.             }
  366.             
  367.             public string 科目名称 {
  368.                 get {
  369.                     try {
  370.                         return ((string)(this[this.table科目表.科目名称Column]));
  371.                     }
  372.                     catch (InvalidCastException e) {
  373.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  374.                     }
  375.                 }
  376.                 set {
  377.                     this[this.table科目表.科目名称Column] = value;
  378.                 }
  379.             }
  380.             
  381.             public string 助记码 {
  382.                 get {
  383.                     try {
  384.                         return ((string)(this[this.table科目表.助记码Column]));
  385.                     }
  386.                     catch (InvalidCastException e) {
  387.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  388.                     }
  389.                 }
  390.                 set {
  391.                     this[this.table科目表.助记码Column] = value;
  392.                 }
  393.             }
  394.             
  395.             public string 科目类别 {
  396.                 get {
  397.                     try {
  398.                         return ((string)(this[this.table科目表.科目类别Column]));
  399.                     }
  400.                     catch (InvalidCastException e) {
  401.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  402.                     }
  403.                 }
  404.                 set {
  405.                     this[this.table科目表.科目类别Column] = value;
  406.                 }
  407.             }
  408.             
  409.             public string 是否存货科目 {
  410.                 get {
  411.                     try {
  412.                         return ((string)(this[this.table科目表.是否存货科目Column]));
  413.                     }
  414.                     catch (InvalidCastException e) {
  415.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  416.                     }
  417.                 }
  418.                 set {
  419.                     this[this.table科目表.是否存货科目Column] = value;
  420.                 }
  421.             }
  422.             
  423.             public string 余额方向 {
  424.                 get {
  425.                     try {
  426.                         return ((string)(this[this.table科目表.余额方向Column]));
  427.                     }
  428.                     catch (InvalidCastException e) {
  429.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  430.                     }
  431.                 }
  432.                 set {
  433.                     this[this.table科目表.余额方向Column] = value;
  434.                 }
  435.             }
  436.             
  437.             public string 数量单位 {
  438.                 get {
  439.                     try {
  440.                         return ((string)(this[this.table科目表.数量单位Column]));
  441.                     }
  442.                     catch (InvalidCastException e) {
  443.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  444.                     }
  445.                 }
  446.                 set {
  447.                     this[this.table科目表.数量单位Column] = value;
  448.                 }
  449.             }
  450.             
  451.             public bool Is科目名称Null() {
  452.                 return this.IsNull(this.table科目表.科目名称Column);
  453.             }
  454.             
  455.             public void Set科目名称Null() {
  456.                 this[this.table科目表.科目名称Column] = System.Convert.DBNull;
  457.             }
  458.             
  459.             public bool Is助记码Null() {
  460.                 return this.IsNull(this.table科目表.助记码Column);
  461.             }
  462.             
  463.             public void Set助记码Null() {
  464.                 this[this.table科目表.助记码Column] = System.Convert.DBNull;
  465.             }
  466.             
  467.             public bool Is科目类别Null() {
  468.                 return this.IsNull(this.table科目表.科目类别Column);
  469.             }
  470.             
  471.             public void Set科目类别Null() {
  472.                 this[this.table科目表.科目类别Column] = System.Convert.DBNull;
  473.             }
  474.             
  475.             public bool Is是否存货科目Null() {
  476.                 return this.IsNull(this.table科目表.是否存货科目Column);
  477.             }
  478.             
  479.             public void Set是否存货科目Null() {
  480.                 this[this.table科目表.是否存货科目Column] = System.Convert.DBNull;
  481.             }
  482.             
  483.             public bool Is余额方向Null() {
  484.                 return this.IsNull(this.table科目表.余额方向Column);
  485.             }
  486.             
  487.             public void Set余额方向Null() {
  488.                 this[this.table科目表.余额方向Column] = System.Convert.DBNull;
  489.             }
  490.             
  491.             public bool Is数量单位Null() {
  492.                 return this.IsNull(this.table科目表.数量单位Column);
  493.             }
  494.             
  495.             public void Set数量单位Null() {
  496.                 this[this.table科目表.数量单位Column] = System.Convert.DBNull;
  497.             }
  498.         }
  499.         
  500.         [System.Diagnostics.DebuggerStepThrough()]
  501.         public class 科目表RowChangeEvent : EventArgs {
  502.             
  503.             private 科目表Row eventRow;
  504.             
  505.             private DataRowAction eventAction;
  506.             
  507.             public 科目表RowChangeEvent(科目表Row row, DataRowAction action) {
  508.                 this.eventRow = row;
  509.                 this.eventAction = action;
  510.             }
  511.             
  512.             public 科目表Row Row {
  513.                 get {
  514.                     return this.eventRow;
  515.                 }
  516.             }
  517.             
  518.             public DataRowAction Action {
  519.                 get {
  520.                     return this.eventAction;
  521.                 }
  522.             }
  523.         }
  524.     }
  525. }