/// <summary> /// Adds the action. /// </summary> /// <param name="contestIdParameter">The contest id parameter.</param> /// <param name="action">The action.</param> /// <param name="actionType">Type action</param> /// <param name="userId">the user Id</param> /// <externalUnit/> /// <revision revisor="dev01" date="10/9/2009" version="1.1.1.9"> /// Member Created /// </revision> /// <revision revisor="dev01" date="11/11/2009" version="1.1.2.20"> /// Changed logic to pull the correct session and then add the /// action to it /// </revision> /// <revision revisor="dev01" date="11/12/2009" version="1.1.2.21"> /// Modified search Paradigm /// </revision> public void AddAction( int contestIdParameter, VoterRecordStep action, OutstackConditionId actionType, Guid userId) { var actionSession = new ActionSession { UserId = userId, VoterRecordActionSets = new VoterRecordActionSetList() }; if (this.VoterRecordSessions.Exists(d => d.UserId == userId)) { actionSession = this.VoterRecordSessions.Find(d => d.UserId == userId); } else { this.VoterRecordSessions.Add(actionSession); } actionSession.AddAction(contestIdParameter, action, actionType); }
/// <summary> /// Adds the action. /// </summary> /// <param name="contestIdParameter">The contest id parameter.</param> /// <param name="action">The action.</param> /// <param name="actionType">Type action</param> /// <externalUnit/> /// <revision revisor="dev01" date="10/9/2009" version="1.1.1.9"> /// Member Created /// </revision> /// <revision revisor="dev01" date="11/12/2009" version="1.1.2.21"> /// Modified search Paradigm /// </revision> public void AddAction( int contestIdParameter, VoterRecordStep action, OutstackConditionId actionType) { var actionSet = new VoterRecordActionSet { Type = actionType, ContestId = contestIdParameter, VoterRecordActions = new VoterRecordActionList(), }; if (this.VoterRecordActionSets.Exists(d => d.Type == actionType && d.ContestId == contestIdParameter)) { actionSet = this.VoterRecordActionSets.Find( d => d.Type == actionType && d.ContestId == contestIdParameter); } else { this.VoterRecordActionSets.Add(actionSet); } actionSet.VoterRecordActions.Add(action); }
/// <summary> /// Add a condition to the outstack conditions list. /// </summary> /// <param name="conditionId">Outstack condition ID</param> /// <externalUnit/> /// <revision revisor="dev05" date="09/02/09" version="1.0.16.12"> /// Method created. /// </revision> public void AddOutstackCondition(OutstackConditionId conditionId) { // We leave the condition list as null until we add a condition. // This saves a little space in results.xml. if (this.OutstackConditions == null) { this.OutstackConditions = new OutstackConditionList(); } this.OutstackConditions.Add(new OutstackCondition(conditionId)); }
/// <summary> /// Initializes a new instance of the <see cref="OutstackCondition"/> class. /// </summary> /// <param name="conditionType">Type of the condition.</param> /// <param name="adjudicated">if set to <c>true</c> [adjudicated].</param> /// <externalUnit/> /// <revision revisor="dev13" date="8/24/2009" version="1.0.16.04"> /// Member Created /// </revision> public OutstackCondition(OutstackConditionId conditionType, bool adjudicated) { this.ConditionType = conditionType; this.Adjudicated = adjudicated; }
/// <summary> /// Initializes a new instance of the <see cref="OutstackCondition"/> class. /// </summary> /// <param name="conditionType">Type of the condition.</param> /// <externalUnit/> /// <revision revisor="dev05" date="08/27/09" version="1.0.16.6"> /// Method created. /// </revision> public OutstackCondition(OutstackConditionId conditionType) : this(conditionType, false) { }