📄 roomconsume.cs
字号:
public event view_conroomRowChangeEventHandler view_conroomRowDeleted;
public event view_conroomRowChangeEventHandler view_conroomRowDeleting;
public void Addview_conroomRow(view_conroomRow row) {
this.Rows.Add(row);
}
public view_conroomRow Addview_conroomRow(string Nrid, System.Decimal priceByday, System.Double Discount, System.Double Stotal, System.DateTime Ndatetime, string Ename, string Aname) {
view_conroomRow rowview_conroomRow = ((view_conroomRow)(this.NewRow()));
rowview_conroomRow.ItemArray = new object[] {
Nrid,
priceByday,
Discount,
Stotal,
Ndatetime,
Ename,
Aname};
this.Rows.Add(rowview_conroomRow);
return rowview_conroomRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
view_conroomDataTable cln = ((view_conroomDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new view_conroomDataTable();
}
internal void InitVars() {
this.columnNrid = this.Columns["Nrid"];
this.columnpriceByday = this.Columns["priceByday"];
this.columnDiscount = this.Columns["Discount"];
this.columnStotal = this.Columns["Stotal"];
this.columnNdatetime = this.Columns["Ndatetime"];
this.columnEname = this.Columns["Ename"];
this.columnAname = this.Columns["Aname"];
}
private void InitClass() {
this.columnNrid = new DataColumn("Nrid", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnNrid);
this.columnpriceByday = new DataColumn("priceByday", typeof(System.Decimal), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnpriceByday);
this.columnDiscount = new DataColumn("Discount", typeof(System.Double), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnDiscount);
this.columnStotal = new DataColumn("Stotal", typeof(System.Double), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnStotal);
this.columnNdatetime = new DataColumn("Ndatetime", typeof(System.DateTime), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnNdatetime);
this.columnEname = new DataColumn("Ename", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnEname);
this.columnAname = new DataColumn("Aname", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnAname);
this.columnNrid.AllowDBNull = false;
this.columnpriceByday.AllowDBNull = false;
this.columnDiscount.AllowDBNull = false;
this.columnStotal.ReadOnly = true;
this.columnNdatetime.AllowDBNull = false;
this.columnEname.AllowDBNull = false;
this.columnAname.AllowDBNull = false;
}
public view_conroomRow Newview_conroomRow() {
return ((view_conroomRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new view_conroomRow(builder);
}
protected override System.Type GetRowType() {
return typeof(view_conroomRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.view_conroomRowChanged != null)) {
this.view_conroomRowChanged(this, new view_conroomRowChangeEvent(((view_conroomRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.view_conroomRowChanging != null)) {
this.view_conroomRowChanging(this, new view_conroomRowChangeEvent(((view_conroomRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.view_conroomRowDeleted != null)) {
this.view_conroomRowDeleted(this, new view_conroomRowChangeEvent(((view_conroomRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.view_conroomRowDeleting != null)) {
this.view_conroomRowDeleting(this, new view_conroomRowChangeEvent(((view_conroomRow)(e.Row)), e.Action));
}
}
public void Removeview_conroomRow(view_conroomRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class view_conroomRow : DataRow {
private view_conroomDataTable tableview_conroom;
internal view_conroomRow(DataRowBuilder rb) :
base(rb) {
this.tableview_conroom = ((view_conroomDataTable)(this.Table));
}
public string Nrid {
get {
return ((string)(this[this.tableview_conroom.NridColumn]));
}
set {
this[this.tableview_conroom.NridColumn] = value;
}
}
public System.Decimal priceByday {
get {
return ((System.Decimal)(this[this.tableview_conroom.priceBydayColumn]));
}
set {
this[this.tableview_conroom.priceBydayColumn] = value;
}
}
public System.Double Discount {
get {
return ((System.Double)(this[this.tableview_conroom.DiscountColumn]));
}
set {
this[this.tableview_conroom.DiscountColumn] = value;
}
}
public System.Double Stotal {
get {
try {
return ((System.Double)(this[this.tableview_conroom.StotalColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableview_conroom.StotalColumn] = value;
}
}
public System.DateTime Ndatetime {
get {
return ((System.DateTime)(this[this.tableview_conroom.NdatetimeColumn]));
}
set {
this[this.tableview_conroom.NdatetimeColumn] = value;
}
}
public string Ename {
get {
return ((string)(this[this.tableview_conroom.EnameColumn]));
}
set {
this[this.tableview_conroom.EnameColumn] = value;
}
}
public string Aname {
get {
return ((string)(this[this.tableview_conroom.AnameColumn]));
}
set {
this[this.tableview_conroom.AnameColumn] = value;
}
}
public bool IsStotalNull() {
return this.IsNull(this.tableview_conroom.StotalColumn);
}
public void SetStotalNull() {
this[this.tableview_conroom.StotalColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class view_conroomRowChangeEvent : EventArgs {
private view_conroomRow eventRow;
private DataRowAction eventAction;
public view_conroomRowChangeEvent(view_conroomRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public view_conroomRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -