Exemplo n.º 1
0
 /// <summary>
 /// The constructor of the class
 /// </summary>
 /// <param name="pId">The unique id of this object</param>
 /// <param name="pUser">The user who made the choice</param>
 /// <param name="pOption">The choice that was selected</param>
 public Vote(string pId, IUser pUser, ISurveyOption pOption, string pSurveyId)
 {
     Id = pId;
     User = pUser;
     Option = pOption;
     SurveyId = pSurveyId;
 }
Exemplo n.º 2
0
 public virtual void AddOption(ISurveyOption pOption)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 3
0
 public virtual bool UpsertSurveyOption(ISurveyOption pSurveyOption)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 4
0
 public Vote(string pId, IUser pUser, ISurveyOption pOption)
 {
 }
Exemplo n.º 5
0
 public virtual IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 6
0
 public IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption, string pSurveyId)
 {
     if (string.IsNullOrEmpty(pId))
         pId = GenericHelper.GenerateId();
     return (new Vote(pId, pUser, pOption, pSurveyId));
 }
Exemplo n.º 7
0
 public virtual IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption)
 {
     if (string.IsNullOrEmpty(pId))
         pId = Helper.GenerateId();
     return (new Vote(pId, pUser, pOption));
 }
Exemplo n.º 8
0
 public void AddVoteOptions(ISurveyOption pOption)
 {
     SurveyOptions.Add(pOption);
 }
Exemplo n.º 9
0
 /// <summary>
 /// The constructor of the class
 /// </summary>
 /// <param name="pId">The unique id of this object</param>
 /// <param name="pUser">The user who made the choice</param>
 /// <param name="pOption">The choice that was selected</param>
 public Vote(string pId, IUser pUser, ISurveyOption pOption)
 {
     Id = pId;
     User = pUser;
     Option = pOption;
 }
Exemplo n.º 10
0
 /// <summary>
 /// This method will add options to a survey. In case a new option is added the Modified event is raised
 /// </summary>
 /// <param name="pOption">The survey option to add</param>
 public virtual void AddOption(ISurveyOption pOption)
 {
     if (!OptionList.Contains(pOption))
     {
         OptionList.Add(pOption);
         List<InteractionAttributes> changedAttributes = new List<InteractionAttributes> {InteractionAttributes.OptionList};
         OnModify(new InteractionEventArgs($"Survey Option list changed [Id={Id}]", DateTime.Now, InteractionType.Survey));
     }
 }