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

企业管理

开发平台:

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 DataSet2 : DataSet {
  22.         
  23.         private 成绩表DataTable table成绩表;
  24.         
  25.         public DataSet2() {
  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 DataSet2(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.             DataSet2 cln = ((DataSet2)(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 = "DataSet2";
  113.             this.Prefix = "";
  114.             this.Namespace = "http://www.tempuri.org/DataSet2.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.             internal 成绩表DataTable() : 
  150.                     base("成绩表") {
  151.                 this.InitClass();
  152.             }
  153.             
  154.             internal 成绩表DataTable(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 学号Column {
  178.                 get {
  179.                     return this.column学号;
  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.             public 成绩表Row this[int index] {
  214.                 get {
  215.                     return ((成绩表Row)(this.Rows[index]));
  216.                 }
  217.             }
  218.             
  219.             public event 成绩表RowChangeEventHandler 成绩表RowChanged;
  220.             
  221.             public event 成绩表RowChangeEventHandler 成绩表RowChanging;
  222.             
  223.             public event 成绩表RowChangeEventHandler 成绩表RowDeleted;
  224.             
  225.             public event 成绩表RowChangeEventHandler 成绩表RowDeleting;
  226.             
  227.             public void Add成绩表Row(成绩表Row row) {
  228.                 this.Rows.Add(row);
  229.             }
  230.             
  231.             public 成绩表Row Add成绩表Row(string 学号, string 姓名, string 课程名称, string 开课系别, string 教师, int 成绩) {
  232.                 成绩表Row row成绩表Row = ((成绩表Row)(this.NewRow()));
  233.                 row成绩表Row.ItemArray = new object[] {
  234.                         学号,
  235.                         姓名,
  236.                         课程名称,
  237.                         开课系别,
  238.                         教师,
  239.                         成绩};
  240.                 this.Rows.Add(row成绩表Row);
  241.                 return row成绩表Row;
  242.             }
  243.             
  244.             public System.Collections.IEnumerator GetEnumerator() {
  245.                 return this.Rows.GetEnumerator();
  246.             }
  247.             
  248.             public override DataTable Clone() {
  249.                 成绩表DataTable cln = ((成绩表DataTable)(base.Clone()));
  250.                 cln.InitVars();
  251.                 return cln;
  252.             }
  253.             
  254.             protected override DataTable CreateInstance() {
  255.                 return new 成绩表DataTable();
  256.             }
  257.             
  258.             internal void InitVars() {
  259.                 this.column学号 = this.Columns["学号"];
  260.                 this.column姓名 = this.Columns["姓名"];
  261.                 this.column课程名称 = this.Columns["课程名称"];
  262.                 this.column开课系别 = this.Columns["开课系别"];
  263.                 this.column教师 = this.Columns["教师"];
  264.                 this.column成绩 = this.Columns["成绩"];
  265.             }
  266.             
  267.             private void InitClass() {
  268.                 this.column学号 = new DataColumn("学号", typeof(string), null, System.Data.MappingType.Element);
  269.                 this.Columns.Add(this.column学号);
  270.                 this.column姓名 = new DataColumn("姓名", typeof(string), null, System.Data.MappingType.Element);
  271.                 this.Columns.Add(this.column姓名);
  272.                 this.column课程名称 = new DataColumn("课程名称", typeof(string), null, System.Data.MappingType.Element);
  273.                 this.Columns.Add(this.column课程名称);
  274.                 this.column开课系别 = new DataColumn("开课系别", typeof(string), null, System.Data.MappingType.Element);
  275.                 this.Columns.Add(this.column开课系别);
  276.                 this.column教师 = new DataColumn("教师", typeof(string), null, System.Data.MappingType.Element);
  277.                 this.Columns.Add(this.column教师);
  278.                 this.column成绩 = new DataColumn("成绩", typeof(int), null, System.Data.MappingType.Element);
  279.                 this.Columns.Add(this.column成绩);
  280.                 this.column学号.AllowDBNull = false;
  281.                 this.column课程名称.AllowDBNull = false;
  282.                 this.column成绩.AllowDBNull = false;
  283.             }
  284.             
  285.             public 成绩表Row New成绩表Row() {
  286.                 return ((成绩表Row)(this.NewRow()));
  287.             }
  288.             
  289.             protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
  290.                 return new 成绩表Row(builder);
  291.             }
  292.             
  293.             protected override System.Type GetRowType() {
  294.                 return typeof(成绩表Row);
  295.             }
  296.             
  297.             protected override void OnRowChanged(DataRowChangeEventArgs e) {
  298.                 base.OnRowChanged(e);
  299.                 if ((this.成绩表RowChanged != null)) {
  300.                     this.成绩表RowChanged(this, new 成绩表RowChangeEvent(((成绩表Row)(e.Row)), e.Action));
  301.                 }
  302.             }
  303.             
  304.             protected override void OnRowChanging(DataRowChangeEventArgs e) {
  305.                 base.OnRowChanging(e);
  306.                 if ((this.成绩表RowChanging != null)) {
  307.                     this.成绩表RowChanging(this, new 成绩表RowChangeEvent(((成绩表Row)(e.Row)), e.Action));
  308.                 }
  309.             }
  310.             
  311.             protected override void OnRowDeleted(DataRowChangeEventArgs e) {
  312.                 base.OnRowDeleted(e);
  313.                 if ((this.成绩表RowDeleted != null)) {
  314.                     this.成绩表RowDeleted(this, new 成绩表RowChangeEvent(((成绩表Row)(e.Row)), e.Action));
  315.                 }
  316.             }
  317.             
  318.             protected override void OnRowDeleting(DataRowChangeEventArgs e) {
  319.                 base.OnRowDeleting(e);
  320.                 if ((this.成绩表RowDeleting != null)) {
  321.                     this.成绩表RowDeleting(this, new 成绩表RowChangeEvent(((成绩表Row)(e.Row)), e.Action));
  322.                 }
  323.             }
  324.             
  325.             public void Remove成绩表Row(成绩表Row row) {
  326.                 this.Rows.Remove(row);
  327.             }
  328.         }
  329.         
  330.         [System.Diagnostics.DebuggerStepThrough()]
  331.         public class 成绩表Row : DataRow {
  332.             
  333.             private 成绩表DataTable table成绩表;
  334.             
  335.             internal 成绩表Row(DataRowBuilder rb) : 
  336.                     base(rb) {
  337.                 this.table成绩表 = ((成绩表DataTable)(this.Table));
  338.             }
  339.             
  340.             public string 学号 {
  341.                 get {
  342.                     return ((string)(this[this.table成绩表.学号Column]));
  343.                 }
  344.                 set {
  345.                     this[this.table成绩表.学号Column] = value;
  346.                 }
  347.             }
  348.             
  349.             public string 姓名 {
  350.                 get {
  351.                     try {
  352.                         return ((string)(this[this.table成绩表.姓名Column]));
  353.                     }
  354.                     catch (InvalidCastException e) {
  355.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  356.                     }
  357.                 }
  358.                 set {
  359.                     this[this.table成绩表.姓名Column] = value;
  360.                 }
  361.             }
  362.             
  363.             public string 课程名称 {
  364.                 get {
  365.                     return ((string)(this[this.table成绩表.课程名称Column]));
  366.                 }
  367.                 set {
  368.                     this[this.table成绩表.课程名称Column] = value;
  369.                 }
  370.             }
  371.             
  372.             public string 开课系别 {
  373.                 get {
  374.                     try {
  375.                         return ((string)(this[this.table成绩表.开课系别Column]));
  376.                     }
  377.                     catch (InvalidCastException e) {
  378.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  379.                     }
  380.                 }
  381.                 set {
  382.                     this[this.table成绩表.开课系别Column] = value;
  383.                 }
  384.             }
  385.             
  386.             public string 教师 {
  387.                 get {
  388.                     try {
  389.                         return ((string)(this[this.table成绩表.教师Column]));
  390.                     }
  391.                     catch (InvalidCastException e) {
  392.                         throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
  393.                     }
  394.                 }
  395.                 set {
  396.                     this[this.table成绩表.教师Column] = value;
  397.                 }
  398.             }
  399.             
  400.             public int 成绩 {
  401.                 get {
  402.                     return ((int)(this[this.table成绩表.成绩Column]));
  403.                 }
  404.                 set {
  405.                     this[this.table成绩表.成绩Column] = value;
  406.                 }
  407.             }
  408.             
  409.             public bool Is姓名Null() {
  410.                 return this.IsNull(this.table成绩表.姓名Column);
  411.             }
  412.             
  413.             public void Set姓名Null() {
  414.                 this[this.table成绩表.姓名Column] = System.Convert.DBNull;
  415.             }
  416.             
  417.             public bool Is开课系别Null() {
  418.                 return this.IsNull(this.table成绩表.开课系别Column);
  419.             }
  420.             
  421.             public void Set开课系别Null() {
  422.                 this[this.table成绩表.开课系别Column] = System.Convert.DBNull;
  423.             }
  424.             
  425.             public bool Is教师Null() {
  426.                 return this.IsNull(this.table成绩表.教师Column);
  427.             }
  428.             
  429.             public void Set教师Null() {
  430.                 this[this.table成绩表.教师Column] = System.Convert.DBNull;
  431.             }
  432.         }
  433.         
  434.         [System.Diagnostics.DebuggerStepThrough()]
  435.         public class 成绩表RowChangeEvent : EventArgs {
  436.             
  437.             private 成绩表Row eventRow;
  438.             
  439.             private DataRowAction eventAction;
  440.             
  441.             public 成绩表RowChangeEvent(成绩表Row row, DataRowAction action) {
  442.                 this.eventRow = row;
  443.                 this.eventAction = action;
  444.             }
  445.             
  446.             public 成绩表Row Row {
  447.                 get {
  448.                     return this.eventRow;
  449.                 }
  450.             }
  451.             
  452.             public DataRowAction Action {
  453.                 get {
  454.                     return this.eventAction;
  455.                 }
  456.             }
  457.         }
  458.     }
  459. }