📄 organization.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.2300
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace StudentsMIS.WinForm {
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 Organization : DataSet {
private collegesDataTable tablecolleges;
private specialityDataTable tablespeciality;
private classesDataTable tableclasses;
public Organization() {
this.InitClass();
System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
this.Tables.CollectionChanged += schemaChangedHandler;
this.Relations.CollectionChanged += schemaChangedHandler;
}
protected Organization(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["colleges"] != null)) {
this.Tables.Add(new collegesDataTable(ds.Tables["colleges"]));
}
if ((ds.Tables["speciality"] != null)) {
this.Tables.Add(new specialityDataTable(ds.Tables["speciality"]));
}
if ((ds.Tables["classes"] != null)) {
this.Tables.Add(new classesDataTable(ds.Tables["classes"]));
}
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 collegesDataTable colleges {
get {
return this.tablecolleges;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public specialityDataTable speciality {
get {
return this.tablespeciality;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public classesDataTable classes {
get {
return this.tableclasses;
}
}
public override DataSet Clone() {
Organization cln = ((Organization)(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["colleges"] != null)) {
this.Tables.Add(new collegesDataTable(ds.Tables["colleges"]));
}
if ((ds.Tables["speciality"] != null)) {
this.Tables.Add(new specialityDataTable(ds.Tables["speciality"]));
}
if ((ds.Tables["classes"] != null)) {
this.Tables.Add(new classesDataTable(ds.Tables["classes"]));
}
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.tablecolleges = ((collegesDataTable)(this.Tables["colleges"]));
if ((this.tablecolleges != null)) {
this.tablecolleges.InitVars();
}
this.tablespeciality = ((specialityDataTable)(this.Tables["speciality"]));
if ((this.tablespeciality != null)) {
this.tablespeciality.InitVars();
}
this.tableclasses = ((classesDataTable)(this.Tables["classes"]));
if ((this.tableclasses != null)) {
this.tableclasses.InitVars();
}
}
private void InitClass() {
this.DataSetName = "Organization";
this.Prefix = "";
this.Namespace = "http://tempuri.org/Organization.xsd";
this.Locale = new System.Globalization.CultureInfo("en-US");
this.CaseSensitive = false;
this.EnforceConstraints = true;
this.tablecolleges = new collegesDataTable();
this.Tables.Add(this.tablecolleges);
this.tablespeciality = new specialityDataTable();
this.Tables.Add(this.tablespeciality);
this.tableclasses = new classesDataTable();
this.Tables.Add(this.tableclasses);
ForeignKeyConstraint fkc;
fkc = new ForeignKeyConstraint("collegesspeciality", new DataColumn[] {
this.tablecolleges.college_IDColumn}, new DataColumn[] {
this.tablespeciality.speciality_collegeColumn});
this.tablespeciality.Constraints.Add(fkc);
fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
fkc.DeleteRule = System.Data.Rule.Cascade;
fkc.UpdateRule = System.Data.Rule.Cascade;
fkc = new ForeignKeyConstraint("specialityclasses", new DataColumn[] {
this.tablespeciality.speciality_IDColumn}, new DataColumn[] {
this.tableclasses.class_specialityColumn});
this.tableclasses.Constraints.Add(fkc);
fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
fkc.DeleteRule = System.Data.Rule.Cascade;
fkc.UpdateRule = System.Data.Rule.Cascade;
}
private bool ShouldSerializecolleges() {
return false;
}
private bool ShouldSerializespeciality() {
return false;
}
private bool ShouldSerializeclasses() {
return false;
}
private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
}
}
public delegate void collegesRowChangeEventHandler(object sender, collegesRowChangeEvent e);
public delegate void specialityRowChangeEventHandler(object sender, specialityRowChangeEvent e);
public delegate void classesRowChangeEventHandler(object sender, classesRowChangeEvent e);
[System.Diagnostics.DebuggerStepThrough()]
public class collegesDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columncollege_ID;
private DataColumn columncollege_name;
internal collegesDataTable() :
base("colleges") {
this.InitClass();
}
internal collegesDataTable(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 college_IDColumn {
get {
return this.columncollege_ID;
}
}
internal DataColumn college_nameColumn {
get {
return this.columncollege_name;
}
}
public collegesRow this[int index] {
get {
return ((collegesRow)(this.Rows[index]));
}
}
public event collegesRowChangeEventHandler collegesRowChanged;
public event collegesRowChangeEventHandler collegesRowChanging;
public event collegesRowChangeEventHandler collegesRowDeleted;
public event collegesRowChangeEventHandler collegesRowDeleting;
public void AddcollegesRow(collegesRow row) {
this.Rows.Add(row);
}
public collegesRow AddcollegesRow(string college_ID, string college_name) {
collegesRow rowcollegesRow = ((collegesRow)(this.NewRow()));
rowcollegesRow.ItemArray = new object[] {
college_ID,
college_name};
this.Rows.Add(rowcollegesRow);
return rowcollegesRow;
}
public collegesRow FindBycollege_ID(string college_ID) {
return ((collegesRow)(this.Rows.Find(new object[] {
college_ID})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
collegesDataTable cln = ((collegesDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new collegesDataTable();
}
internal void InitVars() {
this.columncollege_ID = this.Columns["college_ID"];
this.columncollege_name = this.Columns["college_name"];
}
private void InitClass() {
this.columncollege_ID = new DataColumn("college_ID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncollege_ID);
this.columncollege_name = new DataColumn("college_name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncollege_name);
this.Constraints.Add(new UniqueConstraint("OrganizationKey1", new DataColumn[] {
this.columncollege_ID}, true));
this.columncollege_ID.AllowDBNull = false;
this.columncollege_ID.Unique = true;
}
public collegesRow NewcollegesRow() {
return ((collegesRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new collegesRow(builder);
}
protected override System.Type GetRowType() {
return typeof(collegesRow);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -