Exemplo n.º 1
0
        /// <summary>
        /// Adds the record to view model.
        /// </summary>
        /// <param name="newRecord">The new record.</param>
        private void AddRecordToViewModel(T newRecord)
        {
            ViewModels.Add(newRecord);

            ValidationHelper.AddSubViewModelHelpers(new IHaveValidationViewModelHelper[] { newRecord });
            newRecord.ValidationHelper.PageIsValidChanged += ResetPageIsValid();

            RecordAddedOrDeleted?.Invoke();
        }