private void SelectOrderTask_Click2(object sender, EventArgs e) { //delete var order = lbBmachineOrder.SelectedItem as BDeviceOrder; var orders = BeamCutQuery.DeleteOrder(order); if (orders != null) { DS_BDeviceOrders.DataSource = orders; } }