private void GridViewOrders_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { int id = Convert.ToInt32(GridViewOrders.CurrentRow.Cells["IdOrder"].Value); Order order = logic.GetOrderById(id); txtIdOrder.Text = order.IdOrder.ToString(); cmbProName.Text = order.ProductName.ToString(); txtQty.Text = order.Quantity.ToString(); cmbOrderCust.Text = order.CustomerName.ToString(); }
public Order GetOrderById(int id) { GetDataLogic logic = new GetDataLogic(); return(logic.GetOrderById(id)); }