📄 consumedata.cs
字号:
public event proc_WareListRowChangeEventHandler proc_WareListRowChanged;
public event proc_WareListRowChangeEventHandler proc_WareListRowChanging;
public event proc_WareListRowChangeEventHandler proc_WareListRowDeleted;
public event proc_WareListRowChangeEventHandler proc_WareListRowDeleting;
public void Addproc_WareListRow(proc_WareListRow row) {
this.Rows.Add(row);
}
public proc_WareListRow Addproc_WareListRow(string Wname, System.Decimal Wprice, int Wstorage) {
proc_WareListRow rowproc_WareListRow = ((proc_WareListRow)(this.NewRow()));
rowproc_WareListRow.ItemArray = new object[] {
null,
Wname,
Wprice,
Wstorage};
this.Rows.Add(rowproc_WareListRow);
return rowproc_WareListRow;
}
public proc_WareListRow FindByWid(int Wid) {
return ((proc_WareListRow)(this.Rows.Find(new object[] {
Wid})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
proc_WareListDataTable cln = ((proc_WareListDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new proc_WareListDataTable();
}
internal void InitVars() {
this.columnWid = this.Columns["Wid"];
this.columnWname = this.Columns["Wname"];
this.columnWprice = this.Columns["Wprice"];
this.columnWstorage = this.Columns["Wstorage"];
}
private void InitClass() {
this.columnWid = new DataColumn("Wid", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnWid);
this.columnWname = new DataColumn("Wname", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnWname);
this.columnWprice = new DataColumn("Wprice", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnWprice);
this.columnWstorage = new DataColumn("Wstorage", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnWstorage);
this.Constraints.Add(new UniqueConstraint("DocumentKey1", new DataColumn[] {
this.columnWid}, true));
this.columnWid.AutoIncrement = true;
this.columnWid.AllowDBNull = false;
this.columnWid.ReadOnly = true;
this.columnWid.Unique = true;
this.columnWname.AllowDBNull = false;
this.columnWprice.AllowDBNull = false;
}
public proc_WareListRow Newproc_WareListRow() {
return ((proc_WareListRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new proc_WareListRow(builder);
}
protected override System.Type GetRowType() {
return typeof(proc_WareListRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.proc_WareListRowChanged != null)) {
this.proc_WareListRowChanged(this, new proc_WareListRowChangeEvent(((proc_WareListRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.proc_WareListRowChanging != null)) {
this.proc_WareListRowChanging(this, new proc_WareListRowChangeEvent(((proc_WareListRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.proc_WareListRowDeleted != null)) {
this.proc_WareListRowDeleted(this, new proc_WareListRowChangeEvent(((proc_WareListRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.proc_WareListRowDeleting != null)) {
this.proc_WareListRowDeleting(this, new proc_WareListRowChangeEvent(((proc_WareListRow)(e.Row)), e.Action));
}
}
public void Removeproc_WareListRow(proc_WareListRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class proc_WareListRow : DataRow {
private proc_WareListDataTable tableproc_WareList;
internal proc_WareListRow(DataRowBuilder rb) :
base(rb) {
this.tableproc_WareList = ((proc_WareListDataTable)(this.Table));
}
public int Wid {
get {
return ((int)(this[this.tableproc_WareList.WidColumn]));
}
set {
this[this.tableproc_WareList.WidColumn] = value;
}
}
public string Wname {
get {
return ((string)(this[this.tableproc_WareList.WnameColumn]));
}
set {
this[this.tableproc_WareList.WnameColumn] = value;
}
}
public System.Decimal Wprice {
get {
return ((System.Decimal)(this[this.tableproc_WareList.WpriceColumn]));
}
set {
this[this.tableproc_WareList.WpriceColumn] = value;
}
}
public int Wstorage {
get {
try {
return ((int)(this[this.tableproc_WareList.WstorageColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableproc_WareList.WstorageColumn] = value;
}
}
public bool IsWstorageNull() {
return this.IsNull(this.tableproc_WareList.WstorageColumn);
}
public void SetWstorageNull() {
this[this.tableproc_WareList.WstorageColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class proc_WareListRowChangeEvent : EventArgs {
private proc_WareListRow eventRow;
private DataRowAction eventAction;
public proc_WareListRowChangeEvent(proc_WareListRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public proc_WareListRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -