private ConvictionCollection GetProposerConvictions(DataRecord data) { ConvictionCollection convictions = new ConvictionCollection(); for (int currentProposerConviction = 1; currentProposerConviction <= HowManyConvictions; currentProposerConviction ++ ) { convictions.Add(BuildConviction( data["PROPOSERCONV" + currentProposerConviction + "CONVICTIONCODE"], data["PROPOSERCONV" + currentProposerConviction + "CONVICTIONDATE"], data["PROPOSERCONV" + currentProposerConviction + "POINTS"], data["PROPOSERCONV" + currentProposerConviction + "NOOFPOINTS"], data["PROPOSERCONV" + currentProposerConviction + "FINE"], data["PROPOSERCONV" + currentProposerConviction + "FINEAMOUNT"], data["PROPOSERCONV" + currentProposerConviction + "BAN"], data["PROPOSERCONV" + currentProposerConviction + "BANLENGTH"], data["PROPOSERCONV" + currentProposerConviction + "BREATHALYSED"], data["PROPOSERCONV" + currentProposerConviction + "BRETHALYSERREADING"])); } return convictions; }
public ConvictionCollection GetAdditionalDriverConvictions(DataRecord data, string currentDriver) { ConvictionCollection convictions = new ConvictionCollection(); int AdditionalDriverHowManyConvictions = Convert.ToInt32(data["ADD" + currentDriver + "HOWMANYCONVICTIONS"]); ; for (int currentConviction = 1; currentConviction <= AdditionalDriverHowManyConvictions; currentConviction ++ ) { convictions.Add(BuildConviction( data["ADD" + currentDriver + "CONV" + currentConviction + "CONVICTIONCODE"], data["ADD" + currentDriver + "CONV" + currentConviction + "CONVICTIONDATE"], data["ADD" + currentDriver + "CONV" + currentConviction + "POINTS"], data["ADD" + currentDriver + "CONV" + currentConviction + "NOOFPOINTS"], data["ADD" + currentDriver + "CONV" + currentConviction + "FINE"], data["ADD" + currentDriver + "CONV" + currentConviction + "FINEAMOUNT"], data["ADD" + currentDriver + "CONV" + currentConviction + "BAN"], data["ADD" + currentDriver + "CONV" + currentConviction + "BANLENGTH"], data["ADD" + currentDriver + "CONV" + currentConviction + "BREATHALYSED"], data["ADD" + currentDriver + "CONV" + currentConviction + "BRETHALYSERREADING"])); } return convictions; }