Exemple #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;
 }
Exemple #2
0
 public virtual void AddOption(ISurveyOption pOption)
 {
     throw new System.NotImplementedException();
 }
Exemple #3
0
 public virtual bool UpsertSurveyOption(ISurveyOption pSurveyOption)
 {
     throw new System.NotImplementedException();
 }
Exemple #4
0
 public Vote(string pId, IUser pUser, ISurveyOption pOption)
 {
 }
Exemple #5
0
 public virtual IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption)
 {
     throw new System.NotImplementedException();
 }
Exemple #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));
 }
Exemple #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));
 }
Exemple #8
0
 public void AddVoteOptions(ISurveyOption pOption)
 {
     SurveyOptions.Add(pOption);
 }
Exemple #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;
 }
Exemple #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));
     }
 }