Exemplo n.º 1
0
        private async Task Login()
        {
            IsRunning = true;
            if (!CheckInput())
            {
                _logger.Error("Input invalid for login");

                IsRunning = false;
                return;
            }
            var loginParticipant = new Participant()
            {
                UserName = UserName,
                Password = Password
            };
            var participant = await Task.Run(() => _participantDalService.Login(loginParticipant));

            if (participant != null)
            {
                _context.CurrentParticipant = participant;
                await _navigationService.NavigateToMainPage();

                return;
            }
            ErrorText = AppResources.LoginError;
            HasError  = true;
            IsRunning = false;
        }
Exemplo n.º 2
0
 public Participant Login(Participant participant)
 {
     return(_participantDalService.Login(participant));
 }