/// <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; }
public virtual void AddOption(ISurveyOption pOption) { throw new System.NotImplementedException(); }
public virtual bool UpsertSurveyOption(ISurveyOption pSurveyOption) { throw new System.NotImplementedException(); }
public Vote(string pId, IUser pUser, ISurveyOption pOption) { }
public virtual IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption) { throw new System.NotImplementedException(); }
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)); }
public virtual IVote CreateVote(string pId, IUser pUser, ISurveyOption pOption) { if (string.IsNullOrEmpty(pId)) pId = Helper.GenerateId(); return (new Vote(pId, pUser, pOption)); }
public void AddVoteOptions(ISurveyOption pOption) { SurveyOptions.Add(pOption); }
/// <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; }
/// <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)); } }