Esempio n. 1
0
        public Proposition Approve(Proposition proposition)
        {
            Proposition CurrentProposition = _propositionService.GetById(proposition.Id);

            CurrentProposition.Approval.Add(proposition.Approval.Last());

            _approvalService.Save(proposition.Approval.Last());
            return(CurrentProposition);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public PropositionDTO GetById(long id)
 => _propositionConverter.ConvertEntityToDTO(_service.GetById(id));
Esempio n. 4
0
        public Proposition Approve(Proposition proposition)
        {
            Proposition CurrentProposition = _propositionService.GetById(proposition.Id);

            return(CurrentProposition);
        }