Esempio n. 1
0
 public async Task<ActionResult> Coach(CoachSignUpVM coachSignUp)
 {
     //If database insert succeeded
     if (await _signUpManager.RegisterCoach(coachSignUp))
     {
         return View("~/Views/Home/Index.cshtml");
     }
     return View();
 }
Esempio n. 2
0
        public async Task<bool> RegisterCoach(CoachSignUpVM coachSignUp)
        {
            return await _signUpEngine.RegisterCoach(new CoachSignUpDM
            {
                CoachStatus = coachSignUp.CoachStatus,
                SummonerInfo = new SummonerSignUpDM
                {
                    SummonerName = coachSignUp.SummonerInfo.SummonerName,
                    Server = coachSignUp.SummonerInfo.Server,
                    RankTier = coachSignUp.SummonerInfo.RankTier,
                    RankDivision = coachSignUp.SummonerInfo.RankDivision,
                    Age = coachSignUp.SummonerInfo.Age,
                    Email = coachSignUp.SummonerInfo.Email,
                    HasSlackAccount = coachSignUp.SummonerInfo.HasSlackAccount
                },
                InterestedBronze = coachSignUp.InterestedBronze,
                InterestedSilver = coachSignUp.InterestedSilver,
                InterestedGold = coachSignUp.InterestedGold,
                InterestedPlat = coachSignUp.InterestedPlat,
                InterestedDiamond = coachSignUp.InterestedDiamond,

                WillingBronze = coachSignUp.WillingBronze,
                WillingSilver = coachSignUp.WillingSilver,
                WillingGold = coachSignUp.WillingGold,
                WillingPlat = coachSignUp.WillingPlat,
                WillingDiamond = coachSignUp.WillingDiamond,

                AvailabilityInfo = new AvailabilitySignUpDM
                {
                    MondayStart = coachSignUp.AvailabilityInfo.MondayStart,
                    MondayEnd = coachSignUp.AvailabilityInfo.MondayEnd,
                    TuesdayStart = coachSignUp.AvailabilityInfo.TuesdayStart,
                    TuesdayEnd = coachSignUp.AvailabilityInfo.TuesdayEnd,
                    WednesdayStart = coachSignUp.AvailabilityInfo.WednesdayStart,
                    WednesdayEnd = coachSignUp.AvailabilityInfo.WednesdayEnd,
                    ThursdayStart = coachSignUp.AvailabilityInfo.ThursdayStart,
                    ThursdayEnd = coachSignUp.AvailabilityInfo.ThursdayEnd,
                    FridayStart = coachSignUp.AvailabilityInfo.FridayStart,
                    FridayEnd = coachSignUp.AvailabilityInfo.FridayEnd,
                    SaturdayStart = coachSignUp.AvailabilityInfo.SaturdayStart,
                    SaturdayEnd = coachSignUp.AvailabilityInfo.SaturdayEnd,
                    SundayStart = coachSignUp.AvailabilityInfo.SundayStart,
                    SundayEnd = coachSignUp.AvailabilityInfo.SundayEnd,
                },
                Languages = coachSignUp.Languages,
                PairedPlayers = coachSignUp.PairedPlayers,
                CoachingStyle = coachSignUp.CoachingStyle,
                CoachingExperience = coachSignUp.CoachingExperience,
                Commitment = new CommitmentSignUpDM
                {
                    CommitmentLevel = coachSignUp.Commitment.CommitmentLevel,
                    SeriousnessLevel = coachSignUp.Commitment.SeriousnessLevel
                },
                Toxic = new ToxicSignUpDM
                {
                    ToxicLevel = coachSignUp.Toxic.ToxicLevel,
                    HadLowPriorityPunish = coachSignUp.Toxic.HadLowPriorityPunish,
                    HadChatRestrictions = coachSignUp.Toxic.HadChatRestrictions,
                    HadRankedRestrictions = coachSignUp.Toxic.HadRankedRestrictions,
                    HadTemporaryBan = coachSignUp.Toxic.HadTemporaryBan,
                    HadPermanentBan = coachSignUp.Toxic.HadPermanentBan
                },
                MoreInformation = coachSignUp.MoreInformation,
                EmailSignUp = coachSignUp.EmailSignUp
            });
        }