Пример #1
0
        public async void AddClub()
        {
            InitError();
            ClubsServices clubsServices = new ClubsServices();

            try
            {
                bool response = await clubsServices.AddClub(Club);

                if (response)
                {
                    _navigationService.NavigateTo("Clubs");
                }
            }
            catch (BadRequestException e)
            {
                List <Error> errors = e.Errors.ToList();
                GereError(errors);
            }

            catch (Exception e)
            {
                SetGeneralErrorMessage(e);
            }
        }
Пример #2
0
        public async void AddClub()
        {
            InitError();
            ClubsServices  clubsServices = new ClubsServices();
            ResponseObject response      = await clubsServices.AddClub(Club);


            if (response.Success)
            {
                MessengerInstance.Send(new NotificationMessage(NotificationMessageType.ListClub));
                _navigationService.NavigateTo("Clubs");
            }
            else
            {
                List <Error> errors = (List <Error>)response.Content;
                GereError(errors);
            }
        }