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(); }
public void Load(Guid id) { ApproachDetailsDto dto = this.approachService.GetApproach(id); this.Id = dto.Id; this.ApproachName = dto.Name; this.SelectedCriteria = dto.Criteria; }
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); }