📄 dataset1.cs
字号:
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 ZnoColumn {
get {
return this.columnZno;
}
}
internal DataColumn NameColumn {
get {
return this.columnName;
}
}
internal DataColumn SexColumn {
get {
return this.columnSex;
}
}
internal DataColumn BirthdayColumn {
get {
return this.columnBirthday;
}
}
internal DataColumn AddsColumn {
get {
return this.columnAdds;
}
}
internal DataColumn IdCardColumn {
get {
return this.columnIdCard;
}
}
internal DataColumn TelColumn {
get {
return this.columnTel;
}
}
public studentRow this[int index] {
get {
return ((studentRow)(this.Rows[index]));
}
}
public event studentRowChangeEventHandler studentRowChanged;
public event studentRowChangeEventHandler studentRowChanging;
public event studentRowChangeEventHandler studentRowDeleted;
public event studentRowChangeEventHandler studentRowDeleting;
public void AddstudentRow(studentRow row) {
this.Rows.Add(row);
}
public studentRow AddstudentRow(string Zno, string Name, string Sex, string Birthday, string Adds, string IdCard, string Tel) {
studentRow rowstudentRow = ((studentRow)(this.NewRow()));
rowstudentRow.ItemArray = new object[] {
Zno,
Name,
Sex,
Birthday,
Adds,
IdCard,
Tel};
this.Rows.Add(rowstudentRow);
return rowstudentRow;
}
public studentRow FindByZno(string Zno) {
return ((studentRow)(this.Rows.Find(new object[] {
Zno})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
studentDataTable cln = ((studentDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new studentDataTable();
}
internal void InitVars() {
this.columnZno = this.Columns["Zno"];
this.columnName = this.Columns["Name"];
this.columnSex = this.Columns["Sex"];
this.columnBirthday = this.Columns["Birthday"];
this.columnAdds = this.Columns["Adds"];
this.columnIdCard = this.Columns["IdCard"];
this.columnTel = this.Columns["Tel"];
}
private void InitClass() {
this.columnZno = new DataColumn("Zno", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnZno);
this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnName);
this.columnSex = new DataColumn("Sex", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnSex);
this.columnBirthday = new DataColumn("Birthday", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBirthday);
this.columnAdds = new DataColumn("Adds", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAdds);
this.columnIdCard = new DataColumn("IdCard", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnIdCard);
this.columnTel = new DataColumn("Tel", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTel);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnZno}, true));
this.columnZno.AllowDBNull = false;
this.columnZno.Unique = true;
this.columnName.AllowDBNull = false;
this.columnSex.AllowDBNull = false;
this.columnIdCard.AllowDBNull = false;
}
public studentRow NewstudentRow() {
return ((studentRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new studentRow(builder);
}
protected override System.Type GetRowType() {
return typeof(studentRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.studentRowChanged != null)) {
this.studentRowChanged(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.studentRowChanging != null)) {
this.studentRowChanging(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.studentRowDeleted != null)) {
this.studentRowDeleted(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.studentRowDeleting != null)) {
this.studentRowDeleting(this, new studentRowChangeEvent(((studentRow)(e.Row)), e.Action));
}
}
public void RemovestudentRow(studentRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentRow : DataRow {
private studentDataTable tablestudent;
internal studentRow(DataRowBuilder rb) :
base(rb) {
this.tablestudent = ((studentDataTable)(this.Table));
}
public string Zno {
get {
return ((string)(this[this.tablestudent.ZnoColumn]));
}
set {
this[this.tablestudent.ZnoColumn] = value;
}
}
public string Name {
get {
return ((string)(this[this.tablestudent.NameColumn]));
}
set {
this[this.tablestudent.NameColumn] = value;
}
}
public string Sex {
get {
return ((string)(this[this.tablestudent.SexColumn]));
}
set {
this[this.tablestudent.SexColumn] = value;
}
}
public string Birthday {
get {
try {
return ((string)(this[this.tablestudent.BirthdayColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestudent.BirthdayColumn] = value;
}
}
public string Adds {
get {
try {
return ((string)(this[this.tablestudent.AddsColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestudent.AddsColumn] = value;
}
}
public string IdCard {
get {
return ((string)(this[this.tablestudent.IdCardColumn]));
}
set {
this[this.tablestudent.IdCardColumn] = value;
}
}
public string Tel {
get {
try {
return ((string)(this[this.tablestudent.TelColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tablestudent.TelColumn] = value;
}
}
public bool IsBirthdayNull() {
return this.IsNull(this.tablestudent.BirthdayColumn);
}
public void SetBirthdayNull() {
this[this.tablestudent.BirthdayColumn] = System.Convert.DBNull;
}
public bool IsAddsNull() {
return this.IsNull(this.tablestudent.AddsColumn);
}
public void SetAddsNull() {
this[this.tablestudent.AddsColumn] = System.Convert.DBNull;
}
public bool IsTelNull() {
return this.IsNull(this.tablestudent.TelColumn);
}
public void SetTelNull() {
this[this.tablestudent.TelColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class studentRowChangeEvent : EventArgs {
private studentRow eventRow;
private DataRowAction eventAction;
public studentRowChangeEvent(studentRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public studentRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class employ_studentDataTable : DataTable, System.Collections.IEnumerable {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -