📄 teacher.cs
字号:
TbteacherDataTable cln = ((TbteacherDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new TbteacherDataTable();
}
internal void InitVars() {
this.columnteachid = this.Columns["teachid"];
this.columnname = this.Columns["name"];
this.columnsubject = this.Columns["subject"];
this.columnTbteacher_Id = this.Columns["Tbteacher_Id"];
}
private void InitClass() {
this.columnteachid = new DataColumn("teachid", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnteachid);
this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnname);
this.columnsubject = new DataColumn("subject", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnsubject);
this.columnTbteacher_Id = new DataColumn("Tbteacher_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnTbteacher_Id);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnTbteacher_Id}, true));
this.columnteachid.AutoIncrement = true;
this.columnTbteacher_Id.AutoIncrement = true;
this.columnTbteacher_Id.AllowDBNull = false;
this.columnTbteacher_Id.Unique = true;
}
public TbteacherRow NewTbteacherRow() {
return ((TbteacherRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new TbteacherRow(builder);
}
protected override System.Type GetRowType() {
return typeof(TbteacherRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.TbteacherRowChanged != null)) {
this.TbteacherRowChanged(this, new TbteacherRowChangeEvent(((TbteacherRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.TbteacherRowChanging != null)) {
this.TbteacherRowChanging(this, new TbteacherRowChangeEvent(((TbteacherRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.TbteacherRowDeleted != null)) {
this.TbteacherRowDeleted(this, new TbteacherRowChangeEvent(((TbteacherRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.TbteacherRowDeleting != null)) {
this.TbteacherRowDeleting(this, new TbteacherRowChangeEvent(((TbteacherRow)(e.Row)), e.Action));
}
}
public void RemoveTbteacherRow(TbteacherRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class TbteacherRow : DataRow {
private TbteacherDataTable tableTbteacher;
internal TbteacherRow(DataRowBuilder rb) :
base(rb) {
this.tableTbteacher = ((TbteacherDataTable)(this.Table));
}
public int teachid {
get {
try {
return ((int)(this[this.tableTbteacher.teachidColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableTbteacher.teachidColumn] = value;
}
}
public string name {
get {
try {
return ((string)(this[this.tableTbteacher.nameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableTbteacher.nameColumn] = value;
}
}
public string subject {
get {
try {
return ((string)(this[this.tableTbteacher.subjectColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableTbteacher.subjectColumn] = value;
}
}
public bool IsteachidNull() {
return this.IsNull(this.tableTbteacher.teachidColumn);
}
public void SetteachidNull() {
this[this.tableTbteacher.teachidColumn] = System.Convert.DBNull;
}
public bool IsnameNull() {
return this.IsNull(this.tableTbteacher.nameColumn);
}
public void SetnameNull() {
this[this.tableTbteacher.nameColumn] = System.Convert.DBNull;
}
public bool IssubjectNull() {
return this.IsNull(this.tableTbteacher.subjectColumn);
}
public void SetsubjectNull() {
this[this.tableTbteacher.subjectColumn] = System.Convert.DBNull;
}
public _classRow[] GetclassRows() {
return ((_classRow[])(this.GetChildRows(this.Table.ChildRelations["Tbteacher_class"])));
}
public manclassRow[] GetmanclassRows() {
return ((manclassRow[])(this.GetChildRows(this.Table.ChildRelations["Tbteacher_manclass"])));
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class TbteacherRowChangeEvent : EventArgs {
private TbteacherRow eventRow;
private DataRowAction eventAction;
public TbteacherRowChangeEvent(TbteacherRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public TbteacherRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class _classDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn column_class;
private DataColumn columnschooldate;
private DataColumn columnTbteacher_Id;
internal _classDataTable() :
base("class") {
this.InitClass();
}
internal _classDataTable(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 _classColumn {
get {
return this.column_class;
}
}
internal DataColumn schooldateColumn {
get {
return this.columnschooldate;
}
}
internal DataColumn Tbteacher_IdColumn {
get {
return this.columnTbteacher_Id;
}
}
public _classRow this[int index] {
get {
return ((_classRow)(this.Rows[index]));
}
}
public event _classRowChangeEventHandler _classRowChanged;
public event _classRowChangeEventHandler _classRowChanging;
public event _classRowChangeEventHandler _classRowDeleted;
public event _classRowChangeEventHandler _classRowDeleting;
public void Add_classRow(_classRow row) {
this.Rows.Add(row);
}
public _classRow Add_classRow(int _class, System.DateTime schooldate, TbteacherRow parentTbteacherRowByTbteacher_class) {
_classRow row_classRow = ((_classRow)(this.NewRow()));
row_classRow.ItemArray = new object[] {
_class,
schooldate,
parentTbteacherRowByTbteacher_class[3]};
this.Rows.Add(row_classRow);
return row_classRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
_classDataTable cln = ((_classDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new _classDataTable();
}
internal void InitVars() {
this.column_class = this.Columns["class"];
this.columnschooldate = this.Columns["schooldate"];
this.columnTbteacher_Id = this.Columns["Tbteacher_Id"];
}
private void InitClass() {
this.column_class = new DataColumn("class", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column_class);
this.columnschooldate = new DataColumn("schooldate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnschooldate);
this.columnTbteacher_Id = new DataColumn("Tbteacher_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnTbteacher_Id);
this.column_class.AllowDBNull = false;
this.columnschooldate.AllowDBNull = false;
}
public _classRow New_classRow() {
return ((_classRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new _classRow(builder);
}
protected override System.Type GetRowType() {
return typeof(_classRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this._classRowChanged != null)) {
this._classRowChanged(this, new _classRowChangeEvent(((_classRow)(e.Row)), e.Action));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -