本文整理汇总了C#中Order.ReadNewOrderDetail方法的典型用法代码示例。如果您正苦于以下问题:C# Order.ReadNewOrderDetail方法的具体用法?C# Order.ReadNewOrderDetail怎么用?C# Order.ReadNewOrderDetail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Order
的用法示例。
在下文中一共展示了Order.ReadNewOrderDetail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: displayListOfNewOrder
private void displayListOfNewOrder()
{
listViewNewOrder.Items.Clear();
Order od = new Order();
List<Order> listOfOrder = new List<Order>();
listOfOrder = od.ReadNewOrderDetail(labelOrderId.Text);
if (listOfOrder != null)
{
foreach (Order item in listOfOrder)
{
ListViewItem lvi = new ListViewItem(item.Client.ClientId);
lvi.SubItems.Add(item.Client.ClientName);
lvi.SubItems.Add(item.Product.ProductId);
lvi.SubItems.Add(item.Product.ProductName);
lvi.SubItems.Add(item.Product.UnitPrice.ToString());
lvi.SubItems.Add(item.Qty.ToString());
listViewNewOrder.Items.Add(lvi);
}
}
}
示例2: FormUpdateOrder_Load
private void FormUpdateOrder_Load(object sender, EventArgs e)
{
//listViewNewOrder.Items.Clear();
//load from text to listview
if (orderIdSelected != "" && orderIdSelected != null)
{
//MessageBox.Show(OrderGUI.FormListOfOrder.orderIdSelected);
labelOrderId.Text = orderIdSelected;
Order od = new Order();
List<Order> listOfOrder = new List<Order>();
listOfOrder = od.ReadNewOrderDetail(orderIdSelected);
if (listOfOrder != null)
{
foreach (Order item in listOfOrder)
{
ListViewItem lvi = new ListViewItem(item.Client.ClientId);
lvi.SubItems.Add(item.Client.ClientName);
lvi.SubItems.Add(item.Product.ProductId);
lvi.SubItems.Add(item.Product.ProductName);
lvi.SubItems.Add(item.Product.UnitPrice.ToString());
totalPrice = totalPrice + item.Product.UnitPrice;
lvi.SubItems.Add(item.Qty.ToString());
totalQuantity = totalQuantity + item.Qty;
listViewNewOrder.Items.Add(lvi);
}
}
//show the total label
labelTotalPrice.Text = totalPrice.ToString();
labelTotalQty.Text = totalQuantity.ToString();
//readonly
itemReadOnly();
//get client
Client cl = new Client();
List<Client> listOfClient = cl.ReadInformation();
foreach (Client aClient in listOfClient)
{
comboBoxClient.Items.Add(aClient.ClientId + "-" + aClient.ClientName);
}
//get product
List<Product> listOfProducts = null;
Book aBook = new Book();
listOfProducts = aBook.ReadInformation();
foreach (Book oneBook in listOfProducts)
{
comboBoxProduct.Items.Add(oneBook.ProductId + "-" + oneBook.ProductName);
}
Software aSoftware = new Software();
listOfProducts = aSoftware.ReadInformation();
foreach (Software oneSoftware in listOfProducts)
{
comboBoxProduct.Items.Add(oneSoftware.ProductId + "-" + oneSoftware.ProductName);
}
}
}