📄 stumain.cs
字号:
public void AddstuRow(stuRow row) {
this.Rows.Add(row);
}
public stuRow AddstuRow(int stuid, string name, System.DateTime schooldate, int _class, int sex, TbstumainRow parentTbstumainRowByTbstumain_stu) {
stuRow rowstuRow = ((stuRow)(this.NewRow()));
rowstuRow.ItemArray = new object[] {
stuid,
name,
schooldate,
_class,
sex,
parentTbstumainRowByTbstumain_stu[2]};
this.Rows.Add(rowstuRow);
return rowstuRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
stuDataTable cln = ((stuDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new stuDataTable();
}
internal void InitVars() {
this.columnstuid = this.Columns["stuid"];
this.columnname = this.Columns["name"];
this.columnschooldate = this.Columns["schooldate"];
this.column_class = this.Columns["class"];
this.columnsex = this.Columns["sex"];
this.columnTbstumain_Id = this.Columns["Tbstumain_Id"];
}
private void InitClass() {
this.columnstuid = new DataColumn("stuid", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnstuid);
this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnname);
this.columnschooldate = new DataColumn("schooldate", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnschooldate);
this.column_class = new DataColumn("class", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column_class);
this.columnsex = new DataColumn("sex", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnsex);
this.columnTbstumain_Id = new DataColumn("Tbstumain_Id", typeof(int), null, System.Data.MappingType.Hidden);
this.Columns.Add(this.columnTbstumain_Id);
}
public stuRow NewstuRow() {
return ((stuRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new stuRow(builder);
}
protected override System.Type GetRowType() {
return typeof(stuRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.stuRowChanged != null)) {
this.stuRowChanged(this, new stuRowChangeEvent(((stuRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.stuRowChanging != null)) {
this.stuRowChanging(this, new stuRowChangeEvent(((stuRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.stuRowDeleted != null)) {
this.stuRowDeleted(this, new stuRowChangeEvent(((stuRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.stuRowDeleting != null)) {
this.stuRowDeleting(this, new stuRowChangeEvent(((stuRow)(e.Row)), e.Action));
}
}
public void RemovestuRow(stuRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class stuRow : DataRow {
private stuDataTable tablestu;
internal stuRow(DataRowBuilder rb) :
base(rb) {
this.tablestu = ((stuDataTable)(this.Table));
}
public int stuid {
get {
try {
return ((int)(this[this.tablestu.stuidColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu.stuidColumn] = value;
}
}
public string name {
get {
try {
return ((string)(this[this.tablestu.nameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu.nameColumn] = value;
}
}
public System.DateTime schooldate {
get {
try {
return ((System.DateTime)(this[this.tablestu.schooldateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu.schooldateColumn] = value;
}
}
public int _class {
get {
try {
return ((int)(this[this.tablestu._classColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu._classColumn] = value;
}
}
public int sex {
get {
try {
return ((int)(this[this.tablestu.sexColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestu.sexColumn] = value;
}
}
public TbstumainRow TbstumainRow {
get {
return ((TbstumainRow)(this.GetParentRow(this.Table.ParentRelations["Tbstumain_stu"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Tbstumain_stu"]);
}
}
public bool IsstuidNull() {
return this.IsNull(this.tablestu.stuidColumn);
}
public void SetstuidNull() {
this[this.tablestu.stuidColumn] = System.Convert.DBNull;
}
public bool IsnameNull() {
return this.IsNull(this.tablestu.nameColumn);
}
public void SetnameNull() {
this[this.tablestu.nameColumn] = System.Convert.DBNull;
}
public bool IsschooldateNull() {
return this.IsNull(this.tablestu.schooldateColumn);
}
public void SetschooldateNull() {
this[this.tablestu.schooldateColumn] = System.Convert.DBNull;
}
public bool Is_classNull() {
return this.IsNull(this.tablestu._classColumn);
}
public void Set_classNull() {
this[this.tablestu._classColumn] = System.Convert.DBNull;
}
public bool IssexNull() {
return this.IsNull(this.tablestu.sexColumn);
}
public void SetsexNull() {
this[this.tablestu.sexColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class stuRowChangeEvent : EventArgs {
private stuRow eventRow;
private DataRowAction eventAction;
public stuRowChangeEvent(stuRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public stuRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -