Ejemplo n.º 1
0
 public bool CastVote(Dem2Model.Voting onWhat, Vote vote)
 {
     bool voteRegistered = onWhat.RegisterVote(vote);
     if (voteRegistered)
     {
         VoteCast(this, onWhat, vote);
     }
     return voteRegistered;
 }
Ejemplo n.º 2
0
 public bool CastVoteFromLeader(IVotingLeader leader, Voting onWhat, Vote vote)
 {
     bool voteRegistered = onWhat.RegisterVote(vote);
     if (voteRegistered)
     {
         VoteCast(this, onWhat, vote);
     }
     return voteRegistered;
 }
Ejemplo n.º 3
0
        public override bool RegisterVote(Vote vote)
        {
            {

                if (this.State == VotingStates.Ongoing)
                {
                    return EntityRepository.Add(vote);
                }
                else
                {
                    return false;
                }
            }
        }
Ejemplo n.º 4
0
        public bool Equals(Vote second)
        {
            // If parameter is null return false:
            if ((object)second == null)
            {
                return false;
            }

            // Return true if the fields match:
            return OwnerId.Equals(second.OwnerId) && subjectId == second.subjectId;
        }
Ejemplo n.º 5
0
 public virtual bool RegisterVote(Vote vote) {
     return EntityRepository.Add(vote);
 }