dataset2.cs
来自「这是用SQL数据库做的学生信息管理系统。简明」· CS 代码 · 共 357 行
CS
357 行
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.2407
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace 学生与成绩 {
using System;
using System.Data;
using System.Xml;
using System.Runtime.Serialization;
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Diagnostics.DebuggerStepThrough()]
[System.ComponentModel.ToolboxItem(true)]
public class DataSet2 : DataSet {
private 班级DataTable table班级;
public DataSet2() {
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
protected DataSet2(SerializationInfo info, StreamingContext context) {
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
if ((strSchema != null)) {
DataSet ds = new DataSet();
ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
if ((ds.Tables["班级"] != null)) {
this.Tables.Add(new 班级DataTable(ds.Tables["班级"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
this.InitVars();
}
else {
this.InitClass();
}
this.GetSerializationData(info, context);
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public 班级DataTable 班级 {
get {
return this.table班级;
}
}
public override DataSet Clone() {
DataSet2 cln = ((DataSet2)(base.Clone()));
cln.InitVars();
return cln;
}
protected override bool ShouldSerializeTables() {
return false;
}
protected override bool ShouldSerializeRelations() {
return false;
}
protected override void ReadXmlSerializable(XmlReader reader) {
this.Reset();
DataSet ds = new DataSet();
ds.ReadXml(reader);
if ((ds.Tables["班级"] != null)) {
this.Tables.Add(new 班级DataTable(ds.Tables["班级"]));
}
this.DataSetName = ds.DataSetName;
this.Prefix = ds.Prefix;
this.Namespace = ds.Namespace;
this.Locale = ds.Locale;
this.CaseSensitive = ds.CaseSensitive;
this.EnforceConstraints = ds.EnforceConstraints;
this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
this.InitVars();
}
protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
System.IO.MemoryStream stream = new System.IO.MemoryStream();
this.WriteXmlSchema(new XmlTextWriter(stream, null));
stream.Position = 0;
return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
}
internal void InitVars() {
this.table班级 = ((班级DataTable)(this.Tables["班级"]));
if ((this.table班级 != null)) {
this.table班级.InitVars();
}
}
private void InitClass() {
this.DataSetName = "DataSet2";
this.Prefix = "";
this.Namespace = "http://www.tempuri.org/DataSet2.xsd";
this.Locale = new System.Globalization.CultureInfo("zh-CN");
this.CaseSensitive = false;
this.EnforceConstraints = true;
this.table班级 = new 班级DataTable();
this.Tables.Add(this.table班级);
}
private bool ShouldSerialize班级() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public delegate void 班级RowChangeEventHandler(object sender, 班级RowChangeEvent e);
[System.Diagnostics.DebuggerStepThrough()]
public class 班级DataTable : DataTable, System.Collections.IEnumerable {
private DataColumn column班级编号;
private DataColumn column班级名称;
internal 班级DataTable() :
base("班级") {
this.InitClass();
}
internal 班级DataTable(DataTable table) :
base(table.TableName) {
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
this.DisplayExpression = table.DisplayExpression;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn 班级编号Column {
get {
return this.column班级编号;
}
}
internal DataColumn 班级名称Column {
get {
return this.column班级名称;
}
}
public 班级Row this[int index] {
get {
return ((班级Row)(this.Rows[index]));
}
}
public event 班级RowChangeEventHandler 班级RowChanged;
public event 班级RowChangeEventHandler 班级RowChanging;
public event 班级RowChangeEventHandler 班级RowDeleted;
public event 班级RowChangeEventHandler 班级RowDeleting;
public void Add班级Row(班级Row row) {
this.Rows.Add(row);
}
public 班级Row Add班级Row(string 班级编号, string 班级名称) {
班级Row row班级Row = ((班级Row)(this.NewRow()));
row班级Row.ItemArray = new object[] {
班级编号,
班级名称};
this.Rows.Add(row班级Row);
return row班级Row;
}
public 班级Row FindBy班级编号(string 班级编号) {
return ((班级Row)(this.Rows.Find(new object[] {
班级编号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
班级DataTable cln = ((班级DataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new 班级DataTable();
}
internal void InitVars() {
this.column班级编号 = this.Columns["班级编号"];
this.column班级名称 = this.Columns["班级名称"];
}
private void InitClass() {
this.column班级编号 = new DataColumn("班级编号", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column班级编号);
this.column班级名称 = new DataColumn("班级名称", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column班级名称);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.column班级编号}, true));
this.column班级编号.AllowDBNull = false;
this.column班级编号.Unique = true;
}
public 班级Row New班级Row() {
return ((班级Row)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new 班级Row(builder);
}
protected override System.Type GetRowType() {
return typeof(班级Row);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.班级RowChanged != null)) {
this.班级RowChanged(this, new 班级RowChangeEvent(((班级Row)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.班级RowChanging != null)) {
this.班级RowChanging(this, new 班级RowChangeEvent(((班级Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.班级RowDeleted != null)) {
this.班级RowDeleted(this, new 班级RowChangeEvent(((班级Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.班级RowDeleting != null)) {
this.班级RowDeleting(this, new 班级RowChangeEvent(((班级Row)(e.Row)), e.Action));
}
}
public void Remove班级Row(班级Row row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class 班级Row : DataRow {
private 班级DataTable table班级;
internal 班级Row(DataRowBuilder rb) :
base(rb) {
this.table班级 = ((班级DataTable)(this.Table));
}
public string 班级编号 {
get {
return ((string)(this[this.table班级.班级编号Column]));
}
set {
this[this.table班级.班级编号Column] = value;
}
}
public string 班级名称 {
get {
try {
return ((string)(this[this.table班级.班级名称Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table班级.班级名称Column] = value;
}
}
public bool Is班级名称Null() {
return this.IsNull(this.table班级.班级名称Column);
}
public void Set班级名称Null() {
this[this.table班级.班级名称Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class 班级RowChangeEvent : EventArgs {
private 班级Row eventRow;
private DataRowAction eventAction;
public 班级RowChangeEvent(班级Row row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public 班级Row Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?