📄 dataset1.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace WindowsApplication1 {
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 DataSet1 : DataSet {
private studentDataTable tablestudent;
private stu_inforDataTable tablestu_infor;
public DataSet1() {
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
protected DataSet1(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["student"] != null)) {
this.Tables.Add(new studentDataTable(ds.Tables["student"]));
}
if ((ds.Tables["stu_infor"] != null)) {
this.Tables.Add(new stu_inforDataTable(ds.Tables["stu_infor"]));
}
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 studentDataTable student {
get {
return this.tablestudent;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public stu_inforDataTable stu_infor {
get {
return this.tablestu_infor;
}
}
public override DataSet Clone() {
DataSet1 cln = ((DataSet1)(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["student"] != null)) {
this.Tables.Add(new studentDataTable(ds.Tables["student"]));
}
if ((ds.Tables["stu_infor"] != null)) {
this.Tables.Add(new stu_inforDataTable(ds.Tables["stu_infor"]));
}
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.tablestudent = ((studentDataTable)(this.Tables["student"]));
if ((this.tablestudent != null)) {
this.tablestudent.InitVars();
}
this.tablestu_infor = ((stu_inforDataTable)(this.Tables["stu_infor"]));
if ((this.tablestu_infor != null)) {
this.tablestu_infor.InitVars();
}
}
private void InitClass() {
this.DataSetName = "DataSet1";
this.Prefix = "";
this.Namespace = "http://www.tempuri.org/DataSet1.xsd";
this.Locale = new System.Globalization.CultureInfo("zh-CN");
this.CaseSensitive = false;
this.EnforceConstraints = true;
this.tablestudent = new studentDataTable();
this.Tables.Add(this.tablestudent);
this.tablestu_infor = new stu_inforDataTable();
this.Tables.Add(this.tablestu_infor);
}
private bool ShouldSerializestudent() {
return false;
}
private bool ShouldSerializestu_infor() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public delegate void studentRowChangeEventHandler(object sender, studentRowChangeEvent e);
public delegate void stu_inforRowChangeEventHandler(object sender, stu_inforRowChangeEvent e);
[System.Diagnostics.DebuggerStepThrough()]
public class studentDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn column学号;
private DataColumn column姓名;
private DataColumn column专业名;
private DataColumn column性别;
private DataColumn column出生时间;
private DataColumn column总学分;
private DataColumn column备注;
internal studentDataTable() :
base("student") {
this.InitClass();
}
internal studentDataTable(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姓名;
}
}
internal DataColumn 专业名Column {
get {
return this.column专业名;
}
}
internal DataColumn 性别Column {
get {
return this.column性别;
}
}
internal DataColumn 出生时间Column {
get {
return this.column出生时间;
}
}
internal DataColumn 总学分Column {
get {
return this.column总学分;
}
}
internal DataColumn 备注Column {
get {
return this.column备注;
}
}
public studentRow this[int index] {
get {
return ((studentRow)(this.Rows[index]));
}
}
public event studentRowChangeEventHandler studentRowChanged;
public event studentRowChangeEventHandler studentRowChanging;
public event studentRowChangeEventHandler studentRowDeleted;
public event studentRowChangeEventHandler studentRowDeleting;
public void AddstudentRow(studentRow row) {
this.Rows.Add(row);
}
public studentRow AddstudentRow(string 学号, string 姓名, string 专业名, bool 性别, System.DateTime 出生时间, System.Byte 总学分, string 备注) {
studentRow rowstudentRow = ((studentRow)(this.NewRow()));
rowstudentRow.ItemArray = new object[] {
学号,
姓名,
专业名,
性别,
出生时间,
总学分,
备注};
this.Rows.Add(rowstudentRow);
return rowstudentRow;
}
public studentRow FindBy学号(string 学号) {
return ((studentRow)(this.Rows.Find(new object[] {
学号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
studentDataTable cln = ((studentDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new studentDataTable();
}
internal void InitVars() {
this.column学号 = this.Columns["学号"];
this.column姓名 = this.Columns["姓名"];
this.column专业名 = this.Columns["专业名"];
this.column性别 = this.Columns["性别"];
this.column出生时间 = this.Columns["出生时间"];
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.column专业名 = new DataColumn("专业名", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column专业名);
this.column性别 = new DataColumn("性别", typeof(bool), null, System.Data.MappingType.Element);
this.Columns.Add(this.column性别);
this.column出生时间 = new DataColumn("出生时间", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.column出生时间);
this.column总学分 = new DataColumn("总学分", typeof(System.Byte), 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;
this.column姓名.AllowDBNull = false;
this.column专业名.AllowDBNull = false;
this.column性别.AllowDBNull = false;
this.column出生时间.AllowDBNull = false;
}
public studentRow NewstudentRow() {
return ((studentRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new studentRow(builder);
}
protected override System.Type GetRowType() {
return typeof(studentRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.studentRowChanged != null)) {
this.studentRowChanged(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.studentRowChanging != null)) {
this.studentRowChanging(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.studentRowDeleted != null)) {
this.studentRowDeleted(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.studentRowDeleting != null)) {
this.studentRowDeleting(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
public void RemovestudentRow(studentRow row) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -