📄 busdatalist.cs
字号:
return cln;
}
protected override DataTable CreateInstance() {
return new BusDataTable();
}
internal void InitVars() {
this.columnBusID = this.Columns["BusID"];
this.columnCityID = this.Columns["CityID"];
this.columnBusName = this.Columns["BusName"];
this.columnBusType = this.Columns["BusType"];
this.columnBusStartStop = this.Columns["BusStartStop"];
this.columnBusEndStop = this.Columns["BusEndStop"];
this.columnBusDescription = this.Columns["BusDescription"];
}
private void InitClass() {
this.columnBusID = new DataColumn("BusID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusID);
this.columnCityID = new DataColumn("CityID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnCityID);
this.columnBusName = new DataColumn("BusName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusName);
this.columnBusType = new DataColumn("BusType", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusType);
this.columnBusStartStop = new DataColumn("BusStartStop", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusStartStop);
this.columnBusEndStop = new DataColumn("BusEndStop", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusEndStop);
this.columnBusDescription = new DataColumn("BusDescription", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBusDescription);
this.columnBusID.AutoIncrement = true;
this.columnBusID.AllowDBNull = false;
}
public BusRow NewBusRow() {
return ((BusRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new BusRow(builder);
}
protected override System.Type GetRowType() {
return typeof(BusRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.BusRowChanged != null)) {
this.BusRowChanged(this, new BusRowChangeEvent(((BusRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.BusRowChanging != null)) {
this.BusRowChanging(this, new BusRowChangeEvent(((BusRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.BusRowDeleted != null)) {
this.BusRowDeleted(this, new BusRowChangeEvent(((BusRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.BusRowDeleting != null)) {
this.BusRowDeleting(this, new BusRowChangeEvent(((BusRow)(e.Row)), e.Action));
}
}
public void RemoveBusRow(BusRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class BusRow : DataRow {
private BusDataTable tableBus;
internal BusRow(DataRowBuilder rb) :
base(rb) {
this.tableBus = ((BusDataTable)(this.Table));
}
public int BusID {
get {
return ((int)(this[this.tableBus.BusIDColumn]));
}
set {
this[this.tableBus.BusIDColumn] = value;
}
}
public int CityID {
get {
try {
return ((int)(this[this.tableBus.CityIDColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.CityIDColumn] = value;
}
}
public string BusName {
get {
try {
return ((string)(this[this.tableBus.BusNameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.BusNameColumn] = value;
}
}
public string BusType {
get {
try {
return ((string)(this[this.tableBus.BusTypeColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.BusTypeColumn] = value;
}
}
public string BusStartStop {
get {
try {
return ((string)(this[this.tableBus.BusStartStopColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.BusStartStopColumn] = value;
}
}
public string BusEndStop {
get {
try {
return ((string)(this[this.tableBus.BusEndStopColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.BusEndStopColumn] = value;
}
}
public string BusDescription {
get {
try {
return ((string)(this[this.tableBus.BusDescriptionColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableBus.BusDescriptionColumn] = value;
}
}
public bool IsCityIDNull() {
return this.IsNull(this.tableBus.CityIDColumn);
}
public void SetCityIDNull() {
this[this.tableBus.CityIDColumn] = System.Convert.DBNull;
}
public bool IsBusNameNull() {
return this.IsNull(this.tableBus.BusNameColumn);
}
public void SetBusNameNull() {
this[this.tableBus.BusNameColumn] = System.Convert.DBNull;
}
public bool IsBusTypeNull() {
return this.IsNull(this.tableBus.BusTypeColumn);
}
public void SetBusTypeNull() {
this[this.tableBus.BusTypeColumn] = System.Convert.DBNull;
}
public bool IsBusStartStopNull() {
return this.IsNull(this.tableBus.BusStartStopColumn);
}
public void SetBusStartStopNull() {
this[this.tableBus.BusStartStopColumn] = System.Convert.DBNull;
}
public bool IsBusEndStopNull() {
return this.IsNull(this.tableBus.BusEndStopColumn);
}
public void SetBusEndStopNull() {
this[this.tableBus.BusEndStopColumn] = System.Convert.DBNull;
}
public bool IsBusDescriptionNull() {
return this.IsNull(this.tableBus.BusDescriptionColumn);
}
public void SetBusDescriptionNull() {
this[this.tableBus.BusDescriptionColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class BusRowChangeEvent : EventArgs {
private BusRow eventRow;
private DataRowAction eventAction;
public BusRowChangeEvent(BusRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public BusRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -