예제 #1
0
        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;
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            }
        }