コード例 #1
0
        public void Ok()
        {
            this.Id = this.Id == Guid.Empty ? Guid.NewGuid() : this.Id;
            ApproachDetailsDto dto = new ApproachDetailsDto(this.Id, this.ApproachName, this.SelectedCriteria);

            this.approachService.CreateApproach(dto);
            this.TryClose();
        }
コード例 #2
0
        public void Load(Guid id)
        {
            ApproachDetailsDto dto = this.approachService.GetApproach(id);

            this.Id               = dto.Id;
            this.ApproachName     = dto.Name;
            this.SelectedCriteria = dto.Criteria;
        }
コード例 #3
0
        public void CreateApproach(ApproachDetailsDto dto)
        {
            Contract.Assert(dto != null, "Approach details DTO may not be null to create an approach.");

            Name     name     = new Name(dto.Name);
            Criteria criteria = new Criteria(dto.Criteria);
            Approach approach = new Approach(dto.Id, name, criteria);

            this.CreateApproach(approach);
        }