📄 dschoosebook.cs
字号:
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class tblBookInfoDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnID;
private DataColumn columnBookName;
private DataColumn columnAuthor;
private DataColumn columnBookMark;
private DataColumn columnAttribute;
private DataColumn columnStorage;
private DataColumn columnExpr1;
internal tblBookInfoDataTable() :
base("tblBookInfo") {
this.InitClass();
}
internal tblBookInfoDataTable(DataTable table) :
base(table.TableName) {
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
this.DisplayExpression = table.DisplayExpression;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn IDColumn {
get {
return this.columnID;
}
}
internal DataColumn BookNameColumn {
get {
return this.columnBookName;
}
}
internal DataColumn AuthorColumn {
get {
return this.columnAuthor;
}
}
internal DataColumn BookMarkColumn {
get {
return this.columnBookMark;
}
}
internal DataColumn AttributeColumn {
get {
return this.columnAttribute;
}
}
internal DataColumn StorageColumn {
get {
return this.columnStorage;
}
}
internal DataColumn Expr1Column {
get {
return this.columnExpr1;
}
}
public tblBookInfoRow this[int index] {
get {
return ((tblBookInfoRow)(this.Rows[index]));
}
}
public event tblBookInfoRowChangeEventHandler tblBookInfoRowChanged;
public event tblBookInfoRowChangeEventHandler tblBookInfoRowChanging;
public event tblBookInfoRowChangeEventHandler tblBookInfoRowDeleted;
public event tblBookInfoRowChangeEventHandler tblBookInfoRowDeleting;
public void AddtblBookInfoRow(tblBookInfoRow row) {
this.Rows.Add(row);
}
public tblBookInfoRow AddtblBookInfoRow(string BookName, string Author, string BookMark, int Attribute, int Storage) {
tblBookInfoRow rowtblBookInfoRow = ((tblBookInfoRow)(this.NewRow()));
rowtblBookInfoRow.ItemArray = new object[] {
null,
BookName,
Author,
BookMark,
Attribute,
Storage,
null};
this.Rows.Add(rowtblBookInfoRow);
return rowtblBookInfoRow;
}
public tblBookInfoRow FindByIDExpr1(int ID, int Expr1) {
return ((tblBookInfoRow)(this.Rows.Find(new object[] {
ID,
Expr1})));
}
public System.Collections.IEnumerator GetEnumerator() {
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.columnID = this.Columns["ID"];
this.columnBookName = this.Columns["BookName"];
this.columnAuthor = this.Columns["Author"];
this.columnBookMark = this.Columns["BookMark"];
this.columnAttribute = this.Columns["Attribute"];
this.columnStorage = this.Columns["Storage"];
this.columnExpr1 = this.Columns["Expr1"];
}
private void InitClass() {
this.columnID = new DataColumn("ID", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnID);
this.columnBookName = new DataColumn("BookName", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookName);
this.columnAuthor = new DataColumn("Author", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAuthor);
this.columnBookMark = new DataColumn("BookMark", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnBookMark);
this.columnAttribute = new DataColumn("Attribute", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAttribute);
this.columnStorage = new DataColumn("Storage", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStorage);
this.columnExpr1 = new DataColumn("Expr1", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnExpr1);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.columnID,
this.columnExpr1}, true));
this.columnID.AutoIncrement = true;
this.columnID.AllowDBNull = false;
this.columnID.ReadOnly = true;
this.columnBookName.AllowDBNull = false;
this.columnAuthor.AllowDBNull = false;
this.columnAttribute.AllowDBNull = false;
this.columnStorage.AllowDBNull = false;
this.columnExpr1.AutoIncrement = true;
this.columnExpr1.AllowDBNull = false;
this.columnExpr1.ReadOnly = true;
}
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 int ID {
get {
return ((int)(this[this.tabletblBookInfo.IDColumn]));
}
set {
this[this.tabletblBookInfo.IDColumn] = value;
}
}
public string BookName {
get {
return ((string)(this[this.tabletblBookInfo.BookNameColumn]));
}
set {
this[this.tabletblBookInfo.BookNameColumn] = value;
}
}
public string Author {
get {
return ((string)(this[this.tabletblBookInfo.AuthorColumn]));
}
set {
this[this.tabletblBookInfo.AuthorColumn] = value;
}
}
public string BookMark {
get {
try {
return ((string)(this[this.tabletblBookInfo.BookMarkColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tabletblBookInfo.BookMarkColumn] = value;
}
}
public int Attribute {
get {
return ((int)(this[this.tabletblBookInfo.AttributeColumn]));
}
set {
this[this.tabletblBookInfo.AttributeColumn] = value;
}
}
public int Storage {
get {
return ((int)(this[this.tabletblBookInfo.StorageColumn]));
}
set {
this[this.tabletblBookInfo.StorageColumn] = value;
}
}
public int Expr1 {
get {
return ((int)(this[this.tabletblBookInfo.Expr1Column]));
}
set {
this[this.tabletblBookInfo.Expr1Column] = value;
}
}
public bool IsBookMarkNull() {
return this.IsNull(this.tabletblBookInfo.BookMarkColumn);
}
public void SetBookMarkNull() {
this[this.tabletblBookInfo.BookMarkColumn] = 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 + -