Ejemplo n.º 1
0
        public void Load(IEnumerable <SalesUnit> units, SpecificationWrapper specificationWrapper, IUnitOfWork unitOfWork, bool isNew)
        {
            Load(units, unitOfWork, isNew);
            _specificationWrapper = specificationWrapper;
            //назначаем спецификацию всем юнитам
            var specificationSimpleWrapper = new SpecificationSimpleWrapper(_specificationWrapper.Model);

            Groups.ForEach(x => x.Specification = specificationSimpleWrapper);
            _groupsToReject = new ValidatableChangeTrackingCollection <ProjectUnitsGroup>(Groups);
        }
Ejemplo n.º 2
0
        public override void Load(Specification model, bool isNew, object parameter = null)
        {
            base.Load(model, isNew, parameter);

            //при создании новой спецификации
            if (isNew)
            {
                DetailsViewModel.Item.Date = DateTime.Today;
                var specificationSimpleWrapper = new SpecificationSimpleWrapper(DetailsViewModel.Item.Model);
                GroupsViewModel.Groups.ForEach(x => x.Specification = specificationSimpleWrapper);
            }
        }