} // LoadOrderItems private void RefundOrders_Click(object sender, EventArgs e) { // Get the currently selected item in the ListBox. try { string curItem = ((BoxFormat)Orders_Listbox.SelectedItem).databaseID; // connect to DB if it is not connected if (!nsadb.Connected()) { nsadb.OpenConnection(); } // Update the database to mark selected order Refunded and Refresh List nsadb.ManagerRefundOrders(curItem); LoadOrders(); // Give User Feedback that Refund was Successful MessageBox.Show("Order #" + curItem + " Refunded.", "Refund Orders", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch { MessageBox.Show("Order Not Selected!", "Refund Orders", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } // RefundOrders_Click