Beispiel #1
0
        public static void AddQrCode(this TeamViewModel viewModel, Guid raceId)
        {
            var txtQRCode = $"QrCodeType: {QrCodeTypes.RegisterToRace}, RaceId:{raceId}, TeamId:{viewModel.TeamId}";
            var stream    = RaceQrCodeHelper.CreateQrCodes(txtQRCode);

            viewModel.QrCodeArray = stream.ToArray();
        }
Beispiel #2
0
 private static void CreateQrCodesForPoints(RaceDetailViewModel raceViewModel)
 {
     foreach (var stage in raceViewModel.Stages)
     {
         foreach (var point in stage.Points)
         {
             var txtQRCode = $"QrCodeType: {QrCodeTypes.RegisterPoint}, RaceId:{raceViewModel.RaceId}, PointId:{point.PointId}";
             var stream    = RaceQrCodeHelper.CreateQrCodes(txtQRCode);
             point.QrCodeArray = stream.ToArray();
         }
     }
 }
Beispiel #3
0
        private static void CreateQrCodesForStagesAndRaceEnd(RaceDetailViewModel raceViewModel)
        {
            var txtQRCode = $"QrCodeType: {QrCodeTypes.RegisterRaceEnd}, RaceId:{raceViewModel.RaceId}";
            var stream    = RaceQrCodeHelper.CreateQrCodes(txtQRCode);

            raceViewModel.QrCodeArray = stream.ToArray();

            foreach (var stage in raceViewModel.Stages)
            {
                txtQRCode         = $"QrCodeType: {QrCodeTypes.RegisterStageEnd}, RaceId:{raceViewModel.RaceId}, StageId:{stage.StageId}";
                stream            = RaceQrCodeHelper.CreateQrCodes(txtQRCode);
                stage.QrCodeArray = stream.ToArray();
            }
        }