📄 dataset2.cs
字号:
this.Rows.Add(row);
}
public recordRow AddrecordRow(string 学号, string 姓名, string 专业名, bool 性别, System.DateTime 出生时间, System.Byte 总学分, string 备注) {
recordRow rowrecordRow = ((recordRow)(this.NewRow()));
rowrecordRow.ItemArray = new object[] {
学号,
姓名,
专业名,
性别,
出生时间,
总学分,
备注};
this.Rows.Add(rowrecordRow);
return rowrecordRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
recordDataTable cln = ((recordDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new recordDataTable();
}
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.column学号.AllowDBNull = false;
this.column姓名.AllowDBNull = false;
this.column专业名.AllowDBNull = false;
this.column性别.AllowDBNull = false;
this.column出生时间.AllowDBNull = false;
}
public recordRow NewrecordRow() {
return ((recordRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new recordRow(builder);
}
protected override System.Type GetRowType() {
return typeof(recordRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.recordRowChanged != null)) {
this.recordRowChanged(this, new recordRowChangeEvent(((recordRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.recordRowChanging != null)) {
this.recordRowChanging(this, new recordRowChangeEvent(((recordRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.recordRowDeleted != null)) {
this.recordRowDeleted(this, new recordRowChangeEvent(((recordRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.recordRowDeleting != null)) {
this.recordRowDeleting(this, new recordRowChangeEvent(((recordRow)(e.Row)), e.Action));
}
}
public void RemoverecordRow(recordRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class recordRow : DataRow {
private recordDataTable tablerecord;
internal recordRow(DataRowBuilder rb) :
base(rb) {
this.tablerecord = ((recordDataTable)(this.Table));
}
public string 学号 {
get {
return ((string)(this[this.tablerecord.学号Column]));
}
set {
this[this.tablerecord.学号Column] = value;
}
}
public string 姓名 {
get {
return ((string)(this[this.tablerecord.姓名Column]));
}
set {
this[this.tablerecord.姓名Column] = value;
}
}
public string 专业名 {
get {
return ((string)(this[this.tablerecord.专业名Column]));
}
set {
this[this.tablerecord.专业名Column] = value;
}
}
public bool 性别 {
get {
return ((bool)(this[this.tablerecord.性别Column]));
}
set {
this[this.tablerecord.性别Column] = value;
}
}
public System.DateTime 出生时间 {
get {
return ((System.DateTime)(this[this.tablerecord.出生时间Column]));
}
set {
this[this.tablerecord.出生时间Column] = value;
}
}
public System.Byte 总学分 {
get {
try {
return ((System.Byte)(this[this.tablerecord.总学分Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablerecord.总学分Column] = value;
}
}
public string 备注 {
get {
try {
return ((string)(this[this.tablerecord.备注Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablerecord.备注Column] = value;
}
}
public bool Is总学分Null() {
return this.IsNull(this.tablerecord.总学分Column);
}
public void Set总学分Null() {
this[this.tablerecord.总学分Column] = System.Convert.DBNull;
}
public bool Is备注Null() {
return this.IsNull(this.tablerecord.备注Column);
}
public void Set备注Null() {
this[this.tablerecord.备注Column] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class recordRowChangeEvent : EventArgs {
private recordRow eventRow;
private DataRowAction eventAction;
public recordRowChangeEvent(recordRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public recordRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -