📄 dsauthors.cs
字号:
}
public authorsRow AddauthorsRow(string au_id, string au_lname, string au_fname, string city, string state, bool contract) {
authorsRow rowauthorsRow = ((authorsRow)(this.NewRow()));
rowauthorsRow.ItemArray = new object[] {
au_id,
au_lname,
au_fname,
city,
state,
contract};
this.Rows.Add(rowauthorsRow);
return rowauthorsRow;
}
public authorsRow FindByau_id(string au_id) {
return ((authorsRow)(this.Rows.Find(new object[] {
au_id})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
authorsDataTable cln = ((authorsDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new authorsDataTable();
}
internal void InitVars() {
this.columnau_id = this.Columns["au_id"];
this.columnau_lname = this.Columns["au_lname"];
this.columnau_fname = this.Columns["au_fname"];
this.columncity = this.Columns["city"];
this.columnstate = this.Columns["state"];
this.columncontract = this.Columns["contract"];
}
private void InitClass() {
this.columnau_id = new DataColumn("au_id", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnau_id);
this.columnau_lname = new DataColumn("au_lname", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnau_lname);
this.columnau_fname = new DataColumn("au_fname", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnau_fname);
this.columncity = new DataColumn("city", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncity);
this.columnstate = new DataColumn("state", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnstate);
this.columncontract = new DataColumn("contract", typeof(bool), null, System.Data.MappingType.Element);
this.Columns.Add(this.columncontract);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnau_id}, true));
this.columnau_id.AllowDBNull = false;
this.columnau_id.Unique = true;
this.columnau_lname.AllowDBNull = false;
this.columnau_fname.AllowDBNull = false;
this.columncontract.AllowDBNull = false;
}
public authorsRow NewauthorsRow() {
return ((authorsRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
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);
}
}
[System.Diagnostics.DebuggerStepThrough()]
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 city {
get {
try {
return ((string)(this[this.tableauthors.cityColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 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("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableauthors.stateColumn] = value;
}
}
public bool contract {
get {
return ((bool)(this[this.tableauthors.contractColumn]));
}
set {
this[this.tableauthors.contractColumn] = value;
}
}
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;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class authorsRowChangeEvent : EventArgs {
private authorsRow eventRow;
private 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 + -