Ejemplo n.º 1
0
        public void ShowFilterView()
        {
            var commandStartSelection = new CommandFilterBase <TF> {
                Selection = _model
            };

            CommandExecutor.Execute(commandStartSelection);
            _selectionOk = commandStartSelection.DialogResult == DialogResult.OK;
            if (!_selectionOk)
            {
                return;
            }
            _model = commandStartSelection.Selection;
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
            var frmFilter = WindowManager.PrepareShowDialog <T>(false);

            if (frmFilter == null)
            {
                return;
            }
            frmFilter.Selection = Selection;
            frmFilter.LoadBusiness();
            DialogResult = frmFilter.ShowDialog();
            Selection    = frmFilter.Selection;
            frmFilter.Dispose();
        }
Ejemplo n.º 3
0
        public void ShowDataView(IWindowManager windowManager)
        {
            if (_model.SeperateWindow)
            {
                // new View
                _view = windowManager.PrepareShowWindow <TV>(CommandRes.DataLoading, true, false);
            }
            else if (_oldModel.WindowId == 0)
            {
                // find any View
                _view = windowManager.FindWindowInstance <TV>();
            }
            else
            {
                // reuse OldModel
                _oldModel.Overwrite(_model);
                _model = _oldModel;
                // find View by ID
                _view = windowManager.FindWindowInstanceByData <TV>(_model.WindowId);
            }

            if (_view == null)
            {
                // no View found
                _view = windowManager.PrepareShowWindow <TV>(CommandRes.DataLoading, true, false);
            }

            if (!_selectionOk || _model == null)
            {
                return;
            }
            _view.Selection = _model;
            _model.WindowId = _view.GetHashCode();
            _view.LoadBusiness();
            _view.Show();
        }
Ejemplo n.º 4
0
 public FilterBaseControler(IFilterSelection model)
 {
     _oldModel = model;
     _model    = _oldModel.Clone();
 }