private void can_Delete_MouseDown(object sender, MouseButtonEventArgs e) { connect = new CTUConnection(); // refreshens the 'Connection' class // try { connect.DeleteCarService(int.Parse(ID)); connect.SelectCarService(); DGV_Service.ItemsSource = connect.table.DefaultView; } catch (Exception) { } }