public static Registration CreateRegistrationFromImportGruppenliste(ImportGruppenliste importGruppenliste, Person person, MdaParticipationType participationType, TeamParticipation teamParticipitation) { importGruppenliste.Importiert = true; var registration = new Registration { Occasion = importGruppenliste.Occasion, IsIML = !string.IsNullOrEmpty(importGruppenliste.IML), DistanceSaturday = importGruppenliste.StreckeSamstagNormiert, DistanceSunday = importGruppenliste.StreckeSonntagNormiert, HasBustranferSaturday = !string.IsNullOrEmpty(importGruppenliste.Bus), HasLateRegistrationFee = !string.IsNullOrEmpty(importGruppenliste.Nachmelder), NumberOfNightsInAccomodation = !string.IsNullOrEmpty(importGruppenliste.Massenquartier) ? int.Parse(importGruppenliste.Massenquartier) : 0, HasBuffetFriday = !string.IsNullOrEmpty(importGruppenliste.BuffetFreitag), HasBuffetSaturday = !string.IsNullOrEmpty(importGruppenliste.BuffetSamstag), HasAwardHelmet = !string.IsNullOrEmpty(importGruppenliste.Helm), HasAwardRibbon = !string.IsNullOrEmpty(importGruppenliste.Bandschnalle), RegistrationDate = DateTime.Parse(importGruppenliste.Anmeldedatum), Person = person, TeamParticipation = teamParticipitation, MdaParticipationType = participationType, }; return registration; }
public static Adress CreateAddressFromImportGruppenliste(ImportGruppenliste importGruppenliste) { var address = new Adress { AddressLine1 = importGruppenliste.STRASSE, City = importGruppenliste.ORT, Postcode = importGruppenliste.PLZ, MdaCountry = importGruppenliste.MdaCountry }; return address; }