📄 dataset2.cs
字号:
public event numRowChangeEventHandler numRowDeleted;
public event numRowChangeEventHandler numRowDeleting;
public void AddnumRow(numRow row) {
this.Rows.Add(row);
}
public numRow AddnumRow(string 学号, string 项编号, string 项名称, int 数目) {
numRow rownumRow = ((numRow)(this.NewRow()));
rownumRow.ItemArray = new object[] {
学号,
项编号,
项名称,
数目};
this.Rows.Add(rownumRow);
return rownumRow;
}
public numRow FindBy学号项编号(string 学号, string 项编号) {
return ((numRow)(this.Rows.Find(new object[] {
学号,
项编号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
numDataTable cln = ((numDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new numDataTable();
}
internal void InitVars() {
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(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column数目);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.column学号,
this.column项编号}, true));
this.column学号.AllowDBNull = false;
this.column项编号.AllowDBNull = false;
}
public numRow NewnumRow() {
return ((numRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new numRow(builder);
}
protected override System.Type GetRowType() {
return typeof(numRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.numRowChanged != null)) {
this.numRowChanged(this, new numRowChangeEvent(((numRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.numRowChanging != null)) {
this.numRowChanging(this, new numRowChangeEvent(((numRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.numRowDeleted != null)) {
this.numRowDeleted(this, new numRowChangeEvent(((numRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.numRowDeleting != null)) {
this.numRowDeleting(this, new numRowChangeEvent(((numRow)(e.Row)), e.Action));
}
}
public void RemovenumRow(numRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class numRow : DataRow {
private numDataTable tablenum;
internal numRow(DataRowBuilder rb) :
base(rb) {
this.tablenum = ((numDataTable)(this.Table));
}
public string 学号 {
get {
return ((string)(this[this.tablenum.学号Column]));
}
set {
this[this.tablenum.学号Column] = value;
}
}
public string 项编号 {
get {
return ((string)(this[this.tablenum.项编号Column]));
}
set {
this[this.tablenum.项编号Column] = value;
}
}
public string 项名称 {
get {
try {
return ((string)(this[this.tablenum.项名称Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablenum.项名称Column] = value;
}
}
public int 数目 {
get {
try {
return ((int)(this[this.tablenum.数目Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablenum.数目Column] = value;
}
}
public bool Is项名称Null() {
return this.IsNull(this.tablenum.项名称Column);
}
public void Set项名称Null() {
this[this.tablenum.项名称Column] = System.Convert.DBNull;
}
public bool Is数目Null() {
return this.IsNull(this.tablenum.数目Column);
}
public void Set数目Null() {
this[this.tablenum.数目Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class numRowChangeEvent : EventArgs {
private numRow eventRow;
private DataRowAction eventAction;
public numRowChangeEvent(numRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public numRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -