📄 dsquery.cs
字号:
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
tblBookInfoDataTable cln = ((tblBookInfoDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new tblBookInfoDataTable();
}
internal void InitVars() {
this.columnBookName = this.Columns["BookName"];
this.columnBookInfoId = this.Columns["BookInfoId"];
this.columnAuthor = this.Columns["Author"];
this.columnPublish = this.Columns["Publish"];
this.columnBookAttribute = this.Columns["BookAttribute"];
this.columnStorage = this.Columns["Storage"];
this.columnBookAttributeID = this.Columns["BookAttributeID"];
this.columnBookStorageID = this.Columns["BookStorageID"];
}
private void InitClass() {
this.columnBookName = new DataColumn("BookName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookName);
this.columnBookInfoId = new DataColumn("BookInfoId", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookInfoId);
this.columnAuthor = new DataColumn("Author", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAuthor);
this.columnPublish = new DataColumn("Publish", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPublish);
this.columnBookAttribute = new DataColumn("BookAttribute", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookAttribute);
this.columnStorage = new DataColumn("Storage", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStorage);
this.columnBookAttributeID = new DataColumn("BookAttributeID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookAttributeID);
this.columnBookStorageID = new DataColumn("BookStorageID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookStorageID);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnBookInfoId,
this.columnBookAttributeID,
this.columnBookStorageID}, true));
this.columnBookInfoId.AllowDBNull = false;
this.columnBookAttributeID.AllowDBNull = false;
this.columnBookStorageID.AllowDBNull = false;
}
public tblBookInfoRow NewtblBookInfoRow() {
return ((tblBookInfoRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new tblBookInfoRow(builder);
}
protected override System.Type GetRowType() {
return typeof(tblBookInfoRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.tblBookInfoRowChanged != null)) {
this.tblBookInfoRowChanged(this, new tblBookInfoRowChangeEvent(((tblBookInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.tblBookInfoRowChanging != null)) {
this.tblBookInfoRowChanging(this, new tblBookInfoRowChangeEvent(((tblBookInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.tblBookInfoRowDeleted != null)) {
this.tblBookInfoRowDeleted(this, new tblBookInfoRowChangeEvent(((tblBookInfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.tblBookInfoRowDeleting != null)) {
this.tblBookInfoRowDeleting(this, new tblBookInfoRowChangeEvent(((tblBookInfoRow)(e.Row)), e.Action));
}
}
public void RemovetblBookInfoRow(tblBookInfoRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class tblBookInfoRow : DataRow {
private tblBookInfoDataTable tabletblBookInfo;
internal tblBookInfoRow(DataRowBuilder rb) :
base(rb) {
this.tabletblBookInfo = ((tblBookInfoDataTable)(this.Table));
}
public string BookName {
get {
try {
return ((string)(this[this.tabletblBookInfo.BookNameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.BookNameColumn] = value;
}
}
public int BookInfoId {
get {
return ((int)(this[this.tabletblBookInfo.BookInfoIdColumn]));
}
set {
this[this.tabletblBookInfo.BookInfoIdColumn] = value;
}
}
public string Author {
get {
try {
return ((string)(this[this.tabletblBookInfo.AuthorColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.AuthorColumn] = value;
}
}
public string Publish {
get {
try {
return ((string)(this[this.tabletblBookInfo.PublishColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.PublishColumn] = value;
}
}
public string BookAttribute {
get {
try {
return ((string)(this[this.tabletblBookInfo.BookAttributeColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.BookAttributeColumn] = value;
}
}
public int Storage {
get {
try {
return ((int)(this[this.tabletblBookInfo.StorageColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.StorageColumn] = value;
}
}
public int BookAttributeID {
get {
return ((int)(this[this.tabletblBookInfo.BookAttributeIDColumn]));
}
set {
this[this.tabletblBookInfo.BookAttributeIDColumn] = value;
}
}
public int BookStorageID {
get {
return ((int)(this[this.tabletblBookInfo.BookStorageIDColumn]));
}
set {
this[this.tabletblBookInfo.BookStorageIDColumn] = value;
}
}
public bool IsBookNameNull() {
return this.IsNull(this.tabletblBookInfo.BookNameColumn);
}
public void SetBookNameNull() {
this[this.tabletblBookInfo.BookNameColumn] = System.Convert.DBNull;
}
public bool IsAuthorNull() {
return this.IsNull(this.tabletblBookInfo.AuthorColumn);
}
public void SetAuthorNull() {
this[this.tabletblBookInfo.AuthorColumn] = System.Convert.DBNull;
}
public bool IsPublishNull() {
return this.IsNull(this.tabletblBookInfo.PublishColumn);
}
public void SetPublishNull() {
this[this.tabletblBookInfo.PublishColumn] = System.Convert.DBNull;
}
public bool IsBookAttributeNull() {
return this.IsNull(this.tabletblBookInfo.BookAttributeColumn);
}
public void SetBookAttributeNull() {
this[this.tabletblBookInfo.BookAttributeColumn] = System.Convert.DBNull;
}
public bool IsStorageNull() {
return this.IsNull(this.tabletblBookInfo.StorageColumn);
}
public void SetStorageNull() {
this[this.tabletblBookInfo.StorageColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class tblBookInfoRowChangeEvent : EventArgs {
private tblBookInfoRow eventRow;
private DataRowAction eventAction;
public tblBookInfoRowChangeEvent(tblBookInfoRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public tblBookInfoRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -