private WitnessRecord CreateWitnessRecord(List<string> recorditem) { WitnessName = "Witness_" + WitnessNumber; WitnessNumber++; var witness = new WitnessRecord(WitnessName); bool bLastItem = false; int listLength = recorditem.Count; for (int i = 0; i < listLength; i++) { if ((i + 1) == listLength) bLastItem = true; WitnessRecordItem props = new WitnessRecordItem(recorditem[i], WitnessName, bLastItem); witness.addItemToList(props); } return witness; }
private void AddNewWitness(List<string> items) { WitnessName = "Witness_" + WitnessNumber; WitnessNumber++; WitnessRecord witness = new WitnessRecord(WitnessName); bool bLastItem = false; int listLength = items.Count; for (int i = 0; i < listLength; i++) { if ((i + 1) == listLength) bLastItem = true; WitnessRecordItem props = new WitnessRecordItem(items[i], WitnessName, bLastItem); witness.addItemToList(props); } wintessList.addNewWitness(witness); }