private void OrderList_listbox_SelectedIndexChanged(object sender, EventArgs e) { try { if (OrderList_listbox.SelectedIndex >= 0) { Order = (ProductOrderRequest)OrderList_listbox.SelectedItem; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Warning"); } }
public void newOrder(int initQuantity, string initDiscription, string initOrderStatus, int initID) { ProductOrder = new ProductOrderRequest(0, initQuantity, initDiscription, initOrderStatus, initID); ProductOrderRequests.Add(ProductOrder); }