private void dataGridViewOrders_CellContentClick(object sender, DataGridViewCellEventArgs e) { Order order = RetrieveOrderInformation(); OrderDBManager odbm = new OrderDBManager(); dataGridViewOrderDetails.DataSource = odbm.getOrderDetails(order, idUser); }
private void buttonAddOrder_Click(object sender, EventArgs e) { Order order = RetrieveOrderInformation(); OrderDBManager odbm = new OrderDBManager(); odbm.AddOrder(order, idUser); }
private void button1_Click(object sender, EventArgs e) { try { OrderDBManager odbm = new OrderDBManager(); dataGridViewOrders.DataSource = odbm.RetrieveOrders(idUser); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click_2(object sender, EventArgs e) { try { Order order = RetrieveOrderInformation(); OrderDBManager odbm = new OrderDBManager(); odbm.DeleteOrder(order, idUser); } catch (Exception ex) { MessageBox.Show(ex.Message); throw; } }