void dgvWhatever_MouseDoubleClick(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: if (this.SelectedModel == null) { return; } var mv = new ModellView(this.SelectedModel); mv.ShowDialog(this); break; case MouseButtons.Middle: if (this.SelectedModel == null || this.SelectedModel.CanDelete) { return; } var list = RepoManager.KundenmaschinenRepository.GetKundenmaschinenList(this.SelectedModel); var titel = $"Kundenmaschinen des Maschinenmodells '{this.SelectedModel.Modellbezeichnung}'"; var klv = new KundenmaschinenListView(list, titel); klv.Show(this); break; case MouseButtons.XButton1: break; case MouseButtons.XButton2: break; default: break; } }
void ShowKundenmaschinenlisteSerie() { if (this.myCurrentMaschinenserie == null) { return; } var list = RepoManager.KundenmaschinenRepository.GetKundenmaschinenList(this.myCurrentMaschinenserie); var titel = $"Kundenmaschinen für Serie '{this.myCurrentMaschinenserie.Serienname}'"; var klv = new KundenmaschinenListView(list, titel); klv.Show(this); }
void ShowKundenmaschinenListe() { if (this.SelectedModel == null) { return; } var list = RepoManager.KundenmaschinenRepository.GetKundenmaschinenList(this.SelectedModel); if (list.Count > 0) { var titel = $"Kundenmaschinen für Maschinenmodell '{this.SelectedModel.Modellbezeichnung}'"; var klv = new KundenmaschinenListView(list, titel); klv.Show(this); } }