📄 dataset1.cs
字号:
this.columnmemo = this.Columns["memo"];
this.columnstate = this.Columns["state"];
}
private void InitClass() {
this.columnBookID = new DataColumn("BookID", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookID);
this.columnBookName = new DataColumn("BookName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookName);
this.columnType = new DataColumn("Type", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnType);
this.columnTPI = new DataColumn("TPI", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTPI);
this.columnWriter = new DataColumn("Writer", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnWriter);
this.columnPrice = new DataColumn("Price", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnPrice);
this.columnpDate = new DataColumn("pDate", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnpDate);
this.columnmemo = new DataColumn("memo", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnmemo);
this.columnstate = new DataColumn("state", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnstate);
this.Constraints.Add(new UniqueConstraint("DataSet1Key1", new DataColumn[] {
this.columnBookID}, true));
this.columnBookID.AllowDBNull = false;
this.columnBookID.Unique = true;
}
public DB_bookinfoRow NewDB_bookinfoRow() {
return ((DB_bookinfoRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new DB_bookinfoRow(builder);
}
protected override System.Type GetRowType() {
return typeof(DB_bookinfoRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.DB_bookinfoRowChanged != null)) {
this.DB_bookinfoRowChanged(this, new DB_bookinfoRowChangeEvent(((DB_bookinfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.DB_bookinfoRowChanging != null)) {
this.DB_bookinfoRowChanging(this, new DB_bookinfoRowChangeEvent(((DB_bookinfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.DB_bookinfoRowDeleted != null)) {
this.DB_bookinfoRowDeleted(this, new DB_bookinfoRowChangeEvent(((DB_bookinfoRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.DB_bookinfoRowDeleting != null)) {
this.DB_bookinfoRowDeleting(this, new DB_bookinfoRowChangeEvent(((DB_bookinfoRow)(e.Row)), e.Action));
}
}
public void RemoveDB_bookinfoRow(DB_bookinfoRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class DB_bookinfoRow : DataRow {
private DB_bookinfoDataTable tableDB_bookinfo;
internal DB_bookinfoRow(DataRowBuilder rb) :
base(rb) {
this.tableDB_bookinfo = ((DB_bookinfoDataTable)(this.Table));
}
public string BookID {
get {
return ((string)(this[this.tableDB_bookinfo.BookIDColumn]));
}
set {
this[this.tableDB_bookinfo.BookIDColumn] = value;
}
}
public string BookName {
get {
try {
return ((string)(this[this.tableDB_bookinfo.BookNameColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.BookNameColumn] = value;
}
}
public string Type {
get {
try {
return ((string)(this[this.tableDB_bookinfo.TypeColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.TypeColumn] = value;
}
}
public string TPI {
get {
try {
return ((string)(this[this.tableDB_bookinfo.TPIColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.TPIColumn] = value;
}
}
public string Writer {
get {
try {
return ((string)(this[this.tableDB_bookinfo.WriterColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.WriterColumn] = value;
}
}
public System.Decimal Price {
get {
try {
return ((System.Decimal)(this[this.tableDB_bookinfo.PriceColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.PriceColumn] = value;
}
}
public string pDate {
get {
try {
return ((string)(this[this.tableDB_bookinfo.pDateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.pDateColumn] = value;
}
}
public string memo {
get {
try {
return ((string)(this[this.tableDB_bookinfo.memoColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.memoColumn] = value;
}
}
public string state {
get {
try {
return ((string)(this[this.tableDB_bookinfo.stateColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableDB_bookinfo.stateColumn] = value;
}
}
public bool IsBookNameNull() {
return this.IsNull(this.tableDB_bookinfo.BookNameColumn);
}
public void SetBookNameNull() {
this[this.tableDB_bookinfo.BookNameColumn] = System.Convert.DBNull;
}
public bool IsTypeNull() {
return this.IsNull(this.tableDB_bookinfo.TypeColumn);
}
public void SetTypeNull() {
this[this.tableDB_bookinfo.TypeColumn] = System.Convert.DBNull;
}
public bool IsTPINull() {
return this.IsNull(this.tableDB_bookinfo.TPIColumn);
}
public void SetTPINull() {
this[this.tableDB_bookinfo.TPIColumn] = System.Convert.DBNull;
}
public bool IsWriterNull() {
return this.IsNull(this.tableDB_bookinfo.WriterColumn);
}
public void SetWriterNull() {
this[this.tableDB_bookinfo.WriterColumn] = System.Convert.DBNull;
}
public bool IsPriceNull() {
return this.IsNull(this.tableDB_bookinfo.PriceColumn);
}
public void SetPriceNull() {
this[this.tableDB_bookinfo.PriceColumn] = System.Convert.DBNull;
}
public bool IspDateNull() {
return this.IsNull(this.tableDB_bookinfo.pDateColumn);
}
public void SetpDateNull() {
this[this.tableDB_bookinfo.pDateColumn] = System.Convert.DBNull;
}
public bool IsmemoNull() {
return this.IsNull(this.tableDB_bookinfo.memoColumn);
}
public void SetmemoNull() {
this[this.tableDB_bookinfo.memoColumn] = System.Convert.DBNull;
}
public bool IsstateNull() {
return this.IsNull(this.tableDB_bookinfo.stateColumn);
}
public void SetstateNull() {
this[this.tableDB_bookinfo.stateColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class DB_bookinfoRowChangeEvent : EventArgs {
private DB_bookinfoRow eventRow;
private DataRowAction eventAction;
public DB_bookinfoRowChangeEvent(DB_bookinfoRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public DB_bookinfoRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -