Наследование: IDataGridViewController
Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            //Attribution Rules
            _attributionRulesVM = new AttributionRuleVM(this);
            _attRulesDataView.DataController = _attributionRulesVM;
            _attRulesDataView.OnSelectionChanged += OnRuleSelectionChanged;

            _attRuleConditionSetEditor.View = _attributionRulesVM.ConditionSetView;

            //Claims
            _claimsVM = new ClaimsVM(this);
            _claimDataView.DataController = _claimsVM;

            //Conferrals
            _conferralsVM = new ConferralsVM(this);
            _conferralsDataView.DataController = _conferralsVM;
            _conferralsDataView.OnSelectionChanged += () =>
            {
                var c = ((ObjectView<ConferralDTO>) _conferralsDataView.CurrentlySelected)?.Object;
                _conferralsVM.SetSelectedCondition(c == null?Guid.Empty : c.Id);
            };

            _conferralsConditionSetEditor.View = _conferralsVM.ConditionsView;
        }
        public AddOrEditClaimForm(ClaimsVM vm, ClaimDTO dto)
        {
            InitializeComponent();

            _vm = vm;
            _previousDto = dto;

            _add = dto == null;
            _button.Text = _add ? "Add" : "Update";
            if (dto != null)
            {
                _actionTemplateField.Value = (Name)dto.ActionTemplate;
                _clamSI.Value = dto.ClaimSI;
            }
        }