public static void Edit(Form_ShowOrders showForm)
        {
            var selectedRow = showForm.dGridOrderDisplay.CurrentRow;
            var selectedID  = int.Parse(selectedRow.Cells[0].Value.ToString());

            Form_PlaceOrder EditOrder = new Form_PlaceOrder
            {
                IsEditing   = true,
                OrderToEdit = OrderDB.GetOrderbyID(selectedID /*, orderContext*/)
            };

            EditOrder.ShowDialog();
            string[] RowReplacement =
                ToStringArray(OrderDB.GetOrderbyID(selectedID /*, orderContext*/));
            showForm.dGridOrderDisplay.CurrentRow.SetValues(RowReplacement);
        }
        public static void ShowPage(Form_ShowOrders displayForm)
        {
            //const byte pageSize = 14;

            List <Order> pageOrders =
                //OrderDB.GetOrdersByPageWorkaround(displayForm.PageNum, pageSize, orderContext);
                OrderDB.GetAllOrders(/*orderContext*/);

            //List<Order> pageOrders = await
            //    OrderDB.GetOrdersByPage(displayForm.PageNum, pageSize, orderContext);
            foreach (Order orderItem in pageOrders)
            {
                DataGridViewRow orderRow = ToRow(orderItem);

                displayForm.dGridOrderDisplay.Rows.Add(orderRow);
            }
        }
        public static async Task Delete(Form_ShowOrders showForm)
        {
            var selectedRow = showForm.dGridOrderDisplay.CurrentRow;
            var selectedID  = int.Parse(selectedRow.Cells[0].Value.ToString());
            var order       = new Order {
                OrderID = selectedID
            };

            DialogResult dialogResult = MessageBox.Show($"Are you sure you want to delete order #{selectedID}?",
                                                        "Are you sure?", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                showForm.Enabled = false;
                await OrderDB.Delete(order /*, orderContext*/);

                showForm.Enabled = true;
                MessageBox.Show($"Order #{selectedID} Deleted");
            }
            showForm.dGridOrderDisplay.Rows.RemoveAt(selectedRow.Index);
        }
        private void BtnShowOrders_Click(object sender, EventArgs e)
        {
            Form_ShowOrders ShowOrders = new Form_ShowOrders();

            ShowOrders.ShowDialog();
        }