protected override async Task OnInitializedAsync()
        {
            StarsList = new List <int> {
                1, 2, 3, 4, 5
            };

            NullOption = "None";

            BackRoute = $"ninjas/{Id}";

            NinjaModel = await NinjaViewModelService.GetNinja(long.Parse(Id));

            Mysteries = await MysteryViewModel.GetMysteryList();

            Attacks = await AttackViewModel.GetAttackList();

            Chases = await ChaseViewModel.GetChaseList();

            Passives = await PassiveViewModel.GetPassiveList();

            MysIdString = NinjaModel.MysteryId.ToString();
            AttIdString = NinjaModel.AttackId.ToString();

            if (NinjaModel.ChaseId1 != null)
            {
                ChaseId1S = NinjaModel.ChaseId1.ToString();
            }
            else
            {
                ChaseId1S = NullOption;
            }
            if (NinjaModel.ChaseId2 != null)
            {
                ChaseId2S = NinjaModel.ChaseId2.ToString();
            }
            else
            {
                ChaseId2S = NullOption;
            }
            if (NinjaModel.ChaseId3 != null)
            {
                ChaseId3S = NinjaModel.ChaseId3.ToString();
            }
            else
            {
                ChaseId3S = NullOption;
            }
            if (NinjaModel.PassiveId1 != null)
            {
                PassiveId1S = NinjaModel.PassiveId1.ToString();
            }
            else
            {
                PassiveId1S = NullOption;
            }
            if (NinjaModel.PassiveId2 != null)
            {
                PassiveId2S = NinjaModel.PassiveId2.ToString();
            }
            else
            {
                PassiveId2S = NullOption;
            }
            if (NinjaModel.PassiveId3 != null)
            {
                PassiveId3S = NinjaModel.PassiveId3.ToString();
            }
            else
            {
                PassiveId3S = NullOption;
            }

            StarsString = NinjaModel.Stars.ToString();

            NinjaViewModel = NinjaModel;
        }
        protected override async Task OnInitializedAsync()
        {
            ChaseList = await ChaseViewModel.GetChaseList();

            FilteredList = ChaseList;
        }
Exemple #3
0
        protected override async Task OnInitializedAsync()
        {
            NullOption = "None";

            Mysteries = await MysteryViewModel.GetMysteryList();

            Attacks = await AttackViewModel.GetAttackList();

            Chases = await ChaseViewModel.GetChaseList();

            Passives = await PassiveViewModel.GetPassiveList();

            if (NinjaModel.ChaseId1 != null)
            {
                ChaseId1S = NinjaModel.ChaseId1.ToString();
            }
            else
            {
                ChaseId1S = NullOption;
            }
            if (NinjaModel.ChaseId2 != null)
            {
                ChaseId2S = NinjaModel.ChaseId2.ToString();
            }
            else
            {
                ChaseId2S = NullOption;
            }
            if (NinjaModel.ChaseId3 != null)
            {
                ChaseId3S = NinjaModel.ChaseId3.ToString();
            }
            else
            {
                ChaseId3S = NullOption;
            }
            if (NinjaModel.PassiveId1 != null)
            {
                PassiveId1S = NinjaModel.PassiveId1.ToString();
            }
            else
            {
                PassiveId1S = NullOption;
            }
            if (NinjaModel.PassiveId2 != null)
            {
                PassiveId2S = NinjaModel.PassiveId2.ToString();
            }
            else
            {
                PassiveId2S = NullOption;
            }
            if (NinjaModel.PassiveId3 != null)
            {
                PassiveId3S = NinjaModel.PassiveId3.ToString();
            }
            else
            {
                PassiveId3S = NullOption;
            }

            StarsString = NinjaModel.Stars.ToString();

            NinjaViewModel = NinjaModel;
        }