private void can_Delete_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { connect = new CTUConnection(); // refreshens the 'Connection' class // try { connect.DeleteWareHouseVehicle(int.Parse(ID)); connect.SelectWareHouseVehicle(); DGV_Warehouse.ItemsSource = connect.table.DefaultView; } catch (Exception) { } }