📄 dsauthors.cs
字号:
this.Columns.Add(this.columncontract);
this.PrimaryKey = new DataColumn[] {
this.columnau_id};
}
public authorsRow NewauthorsRow() {
return ((authorsRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
// We need to ensure that all Rows in the tabled are typed rows.
// Table calls newRow whenever it needs to create a row.
// So the following conditions are covered by Row newRow(Record record)
// * Cursor calls table.addRecord(record)
// * table.addRow(object[] values) calls newRow(record)
return new authorsRow(builder);
}
protected override System.Type GetRowType() {
return typeof(authorsRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.authorsRowChanged != null)) {
this.authorsRowChanged(this, new authorsRowChangeEvent(((authorsRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.authorsRowChanging != null)) {
this.authorsRowChanging(this, new authorsRowChangeEvent(((authorsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.authorsRowDeleted != null)) {
this.authorsRowDeleted(this, new authorsRowChangeEvent(((authorsRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.authorsRowDeleting != null)) {
this.authorsRowDeleting(this, new authorsRowChangeEvent(((authorsRow)(e.Row)), e.Action));
}
}
public void RemoveauthorsRow(authorsRow row) {
this.Rows.Remove(row);
}
}
public class authorsRow : DataRow {
private authorsDataTable tableauthors;
internal authorsRow(DataRowBuilder rb) :
base(rb) {
this.tableauthors = ((authorsDataTable)(this.Table));
}
public string au_id {
get {
return ((string)(this[this.tableauthors.au_idColumn]));
}
set {
this[this.tableauthors.au_idColumn] = value;
}
}
public string au_lname {
get {
return ((string)(this[this.tableauthors.au_lnameColumn]));
}
set {
this[this.tableauthors.au_lnameColumn] = value;
}
}
public string au_fname {
get {
return ((string)(this[this.tableauthors.au_fnameColumn]));
}
set {
this[this.tableauthors.au_fnameColumn] = value;
}
}
public string phone {
get {
return ((string)(this[this.tableauthors.phoneColumn]));
}
set {
this[this.tableauthors.phoneColumn] = value;
}
}
public string address {
get {
try {
return ((string)(this[this.tableauthors.addressColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableauthors.addressColumn] = value;
}
}
public string city {
get {
try {
return ((string)(this[this.tableauthors.cityColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableauthors.cityColumn] = value;
}
}
public string state {
get {
try {
return ((string)(this[this.tableauthors.stateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableauthors.stateColumn] = value;
}
}
public string zip {
get {
try {
return ((string)(this[this.tableauthors.zipColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("Cannot get value because it is DBNull.", e);
}
}
set {
this[this.tableauthors.zipColumn] = value;
}
}
public bool contract {
get {
return ((bool)(this[this.tableauthors.contractColumn]));
}
set {
this[this.tableauthors.contractColumn] = value;
}
}
public bool IsaddressNull() {
return this.IsNull(this.tableauthors.addressColumn);
}
public void SetaddressNull() {
this[this.tableauthors.addressColumn] = System.Convert.DBNull;
}
public bool IscityNull() {
return this.IsNull(this.tableauthors.cityColumn);
}
public void SetcityNull() {
this[this.tableauthors.cityColumn] = System.Convert.DBNull;
}
public bool IsstateNull() {
return this.IsNull(this.tableauthors.stateColumn);
}
public void SetstateNull() {
this[this.tableauthors.stateColumn] = System.Convert.DBNull;
}
public bool IszipNull() {
return this.IsNull(this.tableauthors.zipColumn);
}
public void SetzipNull() {
this[this.tableauthors.zipColumn] = System.Convert.DBNull;
}
}
public class authorsRowChangeEvent : EventArgs {
private authorsRow eventRow;
private System.Data.DataRowAction eventAction;
public authorsRowChangeEvent(authorsRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public authorsRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -