📄 orders.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.0.2914.16
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace PetShopWS {
using System;
using System.Data;
using System.Xml;
using System.Runtime.Serialization;
[Serializable()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public class Orders : System.Data.DataSet {
private LineItemDataTable tableLineItem;
private OrdersDataTable tableOrders;
public Orders() {
this.InitClass();
}
private Orders(SerializationInfo info, StreamingContext context) {
this.InitClass();
this.GetSerializationData(info, context);
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public LineItemDataTable LineItem {
get {
return this.tableLineItem;
}
}
[System.ComponentModel.Browsable(false)]
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public OrdersDataTable Orders {
get {
return this.tableOrders;
}
}
protected override bool ShouldSerializeTables() {
return false;
}
protected override bool ShouldSerializeRelations() {
return false;
}
protected override void ReadXmlSerializable(XmlReader reader) {
this.ReadXml(reader, XmlReadMode.IgnoreSchema);
}
protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
System.IO.MemoryStream stream = new System.IO.MemoryStream();
this.WriteXmlSchema(new XmlTextWriter(stream, null));
stream.Position = 0;
return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
}
private void InitClass() {
this.DataSetName = "Orders";
this.Namespace = "http://www.tempuri.org/Orders.xsd";
this.tableLineItem = new LineItemDataTable();
this.Tables.Add(this.tableLineItem);
this.tableOrders = new OrdersDataTable();
this.Tables.Add(this.tableOrders);
}
private bool ShouldSerializeLineItem() {
return false;
}
private bool ShouldSerializeOrders() {
return false;
}
public delegate void LineItemRowChangeEventHandler(object sender, LineItemRowChangeEvent e);
public delegate void OrdersRowChangeEventHandler(object sender, OrdersRowChangeEvent e);
public class LineItemDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnorderid;
private DataColumn columnlinenum;
private DataColumn columnitemid;
private DataColumn columnquantity;
private DataColumn columnunitprice;
internal LineItemDataTable() :
base("LineItem") {
this.InitClass();
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn orderidColumn {
get {
return this.columnorderid;
}
}
internal DataColumn linenumColumn {
get {
return this.columnlinenum;
}
}
internal DataColumn itemidColumn {
get {
return this.columnitemid;
}
}
internal DataColumn quantityColumn {
get {
return this.columnquantity;
}
}
internal DataColumn unitpriceColumn {
get {
return this.columnunitprice;
}
}
public LineItemRow this[int index] {
get {
return ((LineItemRow)(this.Rows[index]));
}
}
public event LineItemRowChangeEventHandler LineItemRowChanged;
public event LineItemRowChangeEventHandler LineItemRowChanging;
public event LineItemRowChangeEventHandler LineItemRowDeleted;
public event LineItemRowChangeEventHandler LineItemRowDeleting;
public void AddLineItemRow(LineItemRow row) {
this.Rows.Add(row);
}
public LineItemRow AddLineItemRow(int orderid, int linenum, string itemid, int quantity, System.Decimal unitprice) {
LineItemRow rowLineItemRow = ((LineItemRow)(this.NewRow()));
rowLineItemRow.ItemArray = new object[] {
orderid,
linenum,
itemid,
quantity,
unitprice};
this.Rows.Add(rowLineItemRow);
return rowLineItemRow;
}
public LineItemRow FindByorderidlinenum(int orderid, int linenum) {
return ((LineItemRow)(this.Rows.Find(new object[] {
orderid,
linenum})));
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
private void InitClass() {
this.columnorderid = new DataColumn("orderid", typeof(int), "", System.Data.MappingType.Element);
this.columnorderid.AllowDBNull = false;
this.Columns.Add(this.columnorderid);
this.columnlinenum = new DataColumn("linenum", typeof(int), "", System.Data.MappingType.Element);
this.columnlinenum.AllowDBNull = false;
this.Columns.Add(this.columnlinenum);
this.columnitemid = new DataColumn("itemid", typeof(string), "", System.Data.MappingType.Element);
this.columnitemid.AllowDBNull = false;
this.Columns.Add(this.columnitemid);
this.columnquantity = new DataColumn("quantity", typeof(int), "", System.Data.MappingType.Element);
this.columnquantity.AllowDBNull = false;
this.Columns.Add(this.columnquantity);
this.columnunitprice = new DataColumn("unitprice", typeof(System.Decimal), "", System.Data.MappingType.Element);
this.columnunitprice.AllowDBNull = false;
this.Columns.Add(this.columnunitprice);
this.PrimaryKey = new DataColumn[] {
this.columnorderid,
this.columnlinenum};
}
public LineItemRow NewLineItemRow() {
return ((LineItemRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
// We need to ensure that all Rows in the tabled are typed rows.
// Table calls newRow whenever it needs to create a row.
// So the following conditions are covered by Row newRow(Record record)
// * Cursor calls table.addRecord(record)
// * table.addRow(object[] values) calls newRow(record)
return new LineItemRow(builder);
}
protected override System.Type GetRowType() {
return typeof(LineItemRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.LineItemRowChanged != null)) {
this.LineItemRowChanged(this, new LineItemRowChangeEvent(((LineItemRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.LineItemRowChanging != null)) {
this.LineItemRowChanging(this, new LineItemRowChangeEvent(((LineItemRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.LineItemRowDeleted != null)) {
this.LineItemRowDeleted(this, new LineItemRowChangeEvent(((LineItemRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.LineItemRowDeleting != null)) {
this.LineItemRowDeleting(this, new LineItemRowChangeEvent(((LineItemRow)(e.Row)), e.Action));
}
}
public void RemoveLineItemRow(LineItemRow row) {
this.Rows.Remove(row);
}
}
public class LineItemRow : DataRow {
private LineItemDataTable tableLineItem;
internal LineItemRow(DataRowBuilder rb) :
base(rb) {
this.tableLineItem = ((LineItemDataTable)(this.Table));
}
public int orderid {
get {
return ((int)(this[this.tableLineItem.orderidColumn]));
}
set {
this[this.tableLineItem.orderidColumn] = value;
}
}
public int linenum {
get {
return ((int)(this[this.tableLineItem.linenumColumn]));
}
set {
this[this.tableLineItem.linenumColumn] = value;
}
}
public string itemid {
get {
return ((string)(this[this.tableLineItem.itemidColumn]));
}
set {
this[this.tableLineItem.itemidColumn] = value;
}
}
public int quantity {
get {
return ((int)(this[this.tableLineItem.quantityColumn]));
}
set {
this[this.tableLineItem.quantityColumn] = value;
}
}
public System.Decimal unitprice {
get {
return ((System.Decimal)(this[this.tableLineItem.unitpriceColumn]));
}
set {
this[this.tableLineItem.unitpriceColumn] = value;
}
}
}
public class LineItemRowChangeEvent : EventArgs {
private LineItemRow eventRow;
private System.Data.DataRowAction eventAction;
public LineItemRowChangeEvent(LineItemRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public LineItemRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
public class OrdersDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnorderid;
private DataColumn columnuserid;
private DataColumn columnorderdate;
private DataColumn columnshipaddr1;
private DataColumn columnshipaddr2;
private DataColumn columnshipcity;
private DataColumn columnshipstate;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -