📄 dataset2.cs
字号:
internal DataColumn 现存量Column {
get {
return this.column现存量;
}
}
internal DataColumn 库存总量Column {
get {
return this.column库存总量;
}
}
internal DataColumn 简介Column {
get {
return this.column简介;
}
}
internal DataColumn 是否注销Column {
get {
return this.column是否注销;
}
}
public 图书信息Row this[int index] {
get {
return ((图书信息Row)(this.Rows[index]));
}
}
public event 图书信息RowChangeEventHandler 图书信息RowChanged;
public event 图书信息RowChangeEventHandler 图书信息RowChanging;
public event 图书信息RowChangeEventHandler 图书信息RowDeleted;
public event 图书信息RowChangeEventHandler 图书信息RowDeleting;
public void Add图书信息Row(图书信息Row row) {
this.Rows.Add(row);
}
public 图书信息Row Add图书信息Row(string 编号, string 书名, string 条形码, string 类型, string 作者, string 译者, string ISBN, string 出版社, System.Decimal 价格, int 页码, string 书架名称, int 现存量, int 库存总量, string 简介, bool 是否注销) {
图书信息Row row图书信息Row = ((图书信息Row)(this.NewRow()));
row图书信息Row.ItemArray = new object[] {
编号,
书名,
条形码,
类型,
作者,
译者,
ISBN,
出版社,
价格,
页码,
书架名称,
现存量,
库存总量,
简介,
是否注销};
this.Rows.Add(row图书信息Row);
return row图书信息Row;
}
public 图书信息Row FindBy编号(string 编号) {
return ((图书信息Row)(this.Rows.Find(new object[] {
编号})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
图书信息DataTable cln = ((图书信息DataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new 图书信息DataTable();
}
internal void InitVars() {
this.column编号 = this.Columns["编号"];
this.column书名 = this.Columns["书名"];
this.column条形码 = this.Columns["条形码"];
this.column类型 = this.Columns["类型"];
this.column作者 = this.Columns["作者"];
this.column译者 = this.Columns["译者"];
this.columnISBN = this.Columns["ISBN"];
this.column出版社 = this.Columns["出版社"];
this.column价格 = this.Columns["价格"];
this.column页码 = this.Columns["页码"];
this.column书架名称 = this.Columns["书架名称"];
this.column现存量 = this.Columns["现存量"];
this.column库存总量 = this.Columns["库存总量"];
this.column简介 = this.Columns["简介"];
this.column是否注销 = this.Columns["是否注销"];
}
private void InitClass() {
this.column编号 = new DataColumn("编号", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column编号);
this.column书名 = new DataColumn("书名", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column书名);
this.column条形码 = new DataColumn("条形码", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column条形码);
this.column类型 = new DataColumn("类型", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column类型);
this.column作者 = new DataColumn("作者", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column作者);
this.column译者 = new DataColumn("译者", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column译者);
this.columnISBN = new DataColumn("ISBN", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnISBN);
this.column出版社 = new DataColumn("出版社", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column出版社);
this.column价格 = new DataColumn("价格", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.column价格);
this.column页码 = new DataColumn("页码", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column页码);
this.column书架名称 = new DataColumn("书架名称", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column书架名称);
this.column现存量 = new DataColumn("现存量", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column现存量);
this.column库存总量 = new DataColumn("库存总量", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.column库存总量);
this.column简介 = new DataColumn("简介", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.column简介);
this.column是否注销 = new DataColumn("是否注销", typeof(bool), null, System.Data.MappingType.Element);
this.Columns.Add(this.column是否注销);
this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
this.column编号}, true));
this.column编号.AllowDBNull = false;
this.column编号.Unique = true;
this.column是否注销.AllowDBNull = false;
}
public 图书信息Row New图书信息Row() {
return ((图书信息Row)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new 图书信息Row(builder);
}
protected override System.Type GetRowType() {
return typeof(图书信息Row);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.图书信息RowChanged != null)) {
this.图书信息RowChanged(this, new 图书信息RowChangeEvent(((图书信息Row)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.图书信息RowChanging != null)) {
this.图书信息RowChanging(this, new 图书信息RowChangeEvent(((图书信息Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.图书信息RowDeleted != null)) {
this.图书信息RowDeleted(this, new 图书信息RowChangeEvent(((图书信息Row)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.图书信息RowDeleting != null)) {
this.图书信息RowDeleting(this, new 图书信息RowChangeEvent(((图书信息Row)(e.Row)), e.Action));
}
}
public void Remove图书信息Row(图书信息Row row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class 图书信息Row : DataRow {
private 图书信息DataTable table图书信息;
internal 图书信息Row(DataRowBuilder rb) :
base(rb) {
this.table图书信息 = ((图书信息DataTable)(this.Table));
}
public string 编号 {
get {
return ((string)(this[this.table图书信息.编号Column]));
}
set {
this[this.table图书信息.编号Column] = value;
}
}
public string 书名 {
get {
try {
return ((string)(this[this.table图书信息.书名Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.书名Column] = value;
}
}
public string 条形码 {
get {
try {
return ((string)(this[this.table图书信息.条形码Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.条形码Column] = value;
}
}
public string 类型 {
get {
try {
return ((string)(this[this.table图书信息.类型Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.类型Column] = value;
}
}
public string 作者 {
get {
try {
return ((string)(this[this.table图书信息.作者Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.作者Column] = value;
}
}
public string 译者 {
get {
try {
return ((string)(this[this.table图书信息.译者Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.译者Column] = value;
}
}
public string ISBN {
get {
try {
return ((string)(this[this.table图书信息.ISBNColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.ISBNColumn] = value;
}
}
public string 出版社 {
get {
try {
return ((string)(this[this.table图书信息.出版社Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.出版社Column] = value;
}
}
public System.Decimal 价格 {
get {
try {
return ((System.Decimal)(this[this.table图书信息.价格Column]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.table图书信息.价格Column] = value;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -