public Proposition Approve(Proposition proposition) { Proposition CurrentProposition = _propositionService.GetById(proposition.Id); CurrentProposition.Approval.Add(proposition.Approval.Last()); if (CurrentProposition.Approval.Count() >= 2) { CurrentProposition.State = "Approved"; _propositionService.Update(CurrentProposition); } _approvalService.Save(proposition.Approval.Last()); return(CurrentProposition); }
public Proposition Reject(Proposition proposition) { Proposition CurrentProposition = _propositionService.GetById(proposition.Id); CurrentProposition.Approval.Add(proposition.Approval.Last()); CurrentProposition.State = "Rejected"; _propositionService.Update(CurrentProposition); _approvalService.Save(proposition.Approval.Last()); return(CurrentProposition); }
public PropositionDTO Update(PropositionDTO entity) => _propositionConverter.ConvertEntityToDTO(_service.Update(_propositionConverter.ConvertDTOToEntity(entity)));