public UpdatePointsImport(Race race, Mapping mapping) { _race = race; _partImportUtils = new ParticipantImportUtils(mapping, _race.GetDataModel().GetParticipantCategories(), null); _id2row = new Dictionary <string, DataRow>(); }
private void loadLocal() { Dictionary <string, string> dic = new Dictionary <string, string>(); try { try { _localReader = new FISImportReader(_pathLocal); } catch (System.IO.IOException) { _localReader = null; } } catch (Exception) { _localReader = null; } if (_localReader != null) { _partImportUtils = new ParticipantImportUtils(_localReader.GetMapping(null), _dm.GetParticipantCategories(), new ClassAssignment(_dm.GetParticipantClasses())); } else { _partImportUtils = null; } var handler = DataChanged; handler?.Invoke(this, new EventArgs()); }
private void loadLocal() { Dictionary <string, string> dic = new Dictionary <string, string>(); try { string configJSON = System.IO.File.ReadAllText(_pathLocalDSV); Newtonsoft.Json.JsonConvert.PopulateObject(configJSON, dic); var stream = new MemoryStream(); var writer = new StreamWriter(stream); writer.Write(dic["Data"]); writer.Flush(); stream.Position = 0; try { _localReader = new DSVImportReader(new DSVImportReaderStream(stream, dic["UsedDSVList"])); } catch (System.IO.IOException) { _localReader = null; } } catch (Exception) { _localReader = null; } if (_localReader != null) { _partImportUtils = new ParticipantImportUtils(_localReader.Mapping, _dm.GetParticipantCategories(), new ClassAssignment(_dm.GetParticipantClasses())); } else { _partImportUtils = null; } var handler = DataChanged; handler?.Invoke(this, new EventArgs()); }
public RaceImport(Race race, Mapping mapping, ClassAssignment classAssignment = null) { _race = race; _partImportUtils = new ParticipantImportUtils(mapping, _race.GetDataModel().GetParticipantCategories(), classAssignment); _participantImport = new ParticipantImport(_race.GetDataModel().GetParticipants(), mapping, _race.GetDataModel().GetParticipantCategories(), classAssignment); }
public ParticipantImport(IList <Participant> particpants, Mapping mapping, IList <ParticipantCategory> categories, ClassAssignment classAssignment = null) { _particpants = particpants; _partImportUtils = new ParticipantImportUtils(mapping, categories, classAssignment); }