Пример #1
0
        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
 partial void MdaParticipationTypes_Updating(MdaParticipationType entity)
 {
     entity.ModifiedAt = DateTime.Now;
     entity.ModifiedBy = Application.User.FullName;
 }