?? ds_stu.cs
字號:
studentsRow rowstudentsRow = ((studentsRow)(this.NewRow()));
rowstudentsRow.ItemArray = new object[] {
Studentid,
Studentname,
xy,
zydm,
dwdm};
this.Rows.Add(rowstudentsRow);
return rowstudentsRow;
}
public studentsRow FindByStudentid(string Studentid) {
return ((studentsRow)(this.Rows.Find(new object[] {
Studentid})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
studentsDataTable cln = ((studentsDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new studentsDataTable();
}
internal void InitVars() {
this.columnStudentid = this.Columns["Studentid"];
this.columnStudentname = this.Columns["Studentname"];
this.columnxy = this.Columns["xy"];
this.columnzydm = this.Columns["zydm"];
this.columndwdm = this.Columns["dwdm"];
}
private void InitClass() {
this.columnStudentid = new DataColumn("Studentid", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStudentid);
this.columnStudentname = new DataColumn("Studentname", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStudentname);
this.columnxy = new DataColumn("xy", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnxy);
this.columnzydm = new DataColumn("zydm", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnzydm);
this.columndwdm = new DataColumn("dwdm", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columndwdm);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnStudentid}, true));
this.columnStudentid.AllowDBNull = false;
this.columnStudentid.Unique = true;
this.columnStudentname.AllowDBNull = false;
}
public studentsRow NewstudentsRow() {
return ((studentsRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new studentsRow(builder);
}
protected override System.Type GetRowType() {
return typeof(studentsRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.studentsRowChanged != null)) {
this.studentsRowChanged(this, new studentsRowChangeEvent(((studentsRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.studentsRowChanging != null)) {
this.studentsRowChanging(this, new studentsRowChangeEvent(((studentsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.studentsRowDeleted != null)) {
this.studentsRowDeleted(this, new studentsRowChangeEvent(((studentsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.studentsRowDeleting != null)) {
this.studentsRowDeleting(this, new studentsRowChangeEvent(((studentsRow)(e.Row)), e.Action));
}
}
public void RemovestudentsRow(studentsRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentsRow : DataRow {
private studentsDataTable tablestudents;
internal studentsRow(DataRowBuilder rb) :
base(rb) {
this.tablestudents = ((studentsDataTable)(this.Table));
}
public string Studentid {
get {
return ((string)(this[this.tablestudents.StudentidColumn]));
}
set {
this[this.tablestudents.StudentidColumn] = value;
}
}
public string Studentname {
get {
return ((string)(this[this.tablestudents.StudentnameColumn]));
}
set {
this[this.tablestudents.StudentnameColumn] = value;
}
}
public string xy {
get {
try {
return ((string)(this[this.tablestudents.xyColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tablestudents.xyColumn] = value;
}
}
public string zydm {
get {
try {
return ((string)(this[this.tablestudents.zydmColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tablestudents.zydmColumn] = value;
}
}
public string dwdm {
get {
try {
return ((string)(this[this.tablestudents.dwdmColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("無法獲取值,因為它是 DBNull。", e);
}
}
set {
this[this.tablestudents.dwdmColumn] = value;
}
}
public bool IsxyNull() {
return this.IsNull(this.tablestudents.xyColumn);
}
public void SetxyNull() {
this[this.tablestudents.xyColumn] = System.Convert.DBNull;
}
public bool IszydmNull() {
return this.IsNull(this.tablestudents.zydmColumn);
}
public void SetzydmNull() {
this[this.tablestudents.zydmColumn] = System.Convert.DBNull;
}
public bool IsdwdmNull() {
return this.IsNull(this.tablestudents.dwdmColumn);
}
public void SetdwdmNull() {
this[this.tablestudents.dwdmColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentsRowChangeEvent : EventArgs {
private studentsRow eventRow;
private DataRowAction eventAction;
public studentsRowChangeEvent(studentsRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public studentsRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -