Exemple #1
0
 private void ClearClick()
 {
     for (int i = (DetailsViewList.Count - 1); i >= 0; i--)
     {
         DetailsViewList.RemoveAt(i);
     }
     IsEditable = DetailsViewList.Any();
     OnPropertyChanged(nameof(DetailsViewList));
 }
Exemple #2
0
        private void AddClick()
        {
            DetailsViewModel view = _uc.Resolve <DetailsViewModel>(new ParameterOverride("bestPosRequired", _bestPosRequired));
            var rc = _dlg.ShowDialog <FrmDetailsEdit>(view);

            if (rc == DialogResult.OK)
            {
                DetailsViewList.Add(view);
                IsEditable = DetailsViewList.Any();
                OnPropertyChanged(nameof(DetailsViewList));
            }
        }
Exemple #3
0
        private void DeleteClick(object parm)
        {
            var rc = _dlg.ShowMessageBox("Wollen Sie diese Detailposition wirklich löschen?",
                                         "Detailposition löschen",
                                         MessageBoxButtons.YesNo,
                                         MessageBoxIcon.Question);

            if (rc == DialogResult.Yes)
            {
                int i = (int)parm;
                DetailsViewList.RemoveAt(i);
                IsEditable = DetailsViewList.Any();
                OnPropertyChanged(nameof(DetailsViewList));
            }
        }
Exemple #4
0
 private bool CanSaveExecute(object obj)
 {
     return(DetailsViewList.Any());
 }