public MpResult Confirm(MpResult result, ResultInfo originatingInfo) { CommandInfo commandInfo = new CommandInfo { CommandGeneratedByUser = originatingInfo.CommandGeneratedByUser, OriginatingPollingCentre = originatingInfo.OriginatingPollingCentre, }; ConfirmMpResultsCommand confirmMpResultsCommand = new ConfirmMpResultsCommand { CommandId = Guid.NewGuid(), CommandGeneratedByUser = commandInfo.CommandGeneratedByUser, OriginatingPollingCentre = commandInfo.OriginatingPollingCentre, ApplyToResult = result.GetResultRef(), CommandExecutionOrder = result.LastResultCommandExecutedOrder + 1, }; result.Apply(confirmMpResultsCommand); return(result); }
public MpResult Modify(MpResult result, ResultInfo originatingInfo, List <ResultDetail> resultDetails) { CommandInfo commandInfo = new CommandInfo { CommandGeneratedByUser = originatingInfo.CommandGeneratedByUser, OriginatingPollingCentre = originatingInfo.OriginatingPollingCentre, }; var command = new ModifyMpResultsCommand { CommandId = Guid.NewGuid(), CommandGeneratedByUser = commandInfo.CommandGeneratedByUser, OriginatingPollingCentre = commandInfo.OriginatingPollingCentre, ApplyToResult = result.GetResultRef(), CommandExecutionOrder = result.LastResultCommandExecutedOrder + 1, ResultDetail = resultDetails, }; result.Apply(command); return(result); }