コード例 #1
0
ファイル: Helper.cs プロジェクト: WolfgangLorenz/EMS-Light
        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;
        }
コード例 #2
0
ファイル: Helper.cs プロジェクト: WolfgangLorenz/EMS-Light
 public static Adress CreateAddressFromImportGruppenliste(ImportGruppenliste importGruppenliste)
 {
     var address = new Adress
                       {
                           AddressLine1 = importGruppenliste.STRASSE,
                           City = importGruppenliste.ORT,
                           Postcode = importGruppenliste.PLZ,
                           MdaCountry = importGruppenliste.MdaCountry
                       };
     return address;
 }