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