Example #1
0
 void AdicionarAction()
 {
     if (AdicionarCommand != null)
     {
         SubscribeAdd();
         navigationService.NavigationToCadastro();
     }
     else
     {
         messageService.ShowAsync("Falha na navegação");
     }
 }
        async Task SignUp()
        {
            if (string.IsNullOrEmpty(_Name) || string.IsNullOrEmpty(_Surname) || string.IsNullOrEmpty(_Address) || _DateOfBirth == null || string.IsNullOrEmpty(_PhoneNumber) || string.IsNullOrEmpty(_Password) || string.IsNullOrEmpty(_ConfirmationPassword) || string.IsNullOrEmpty(_Username))
            {
                await Application.Current.MainPage.DisplayAlert("Greška!", "Potrebno je unijeti sva polja!", "Try again");

                return;
            }
            IsBusy = true;
            UserInsertRequest req = new UserInsertRequest
            {
                Name                 = _Name,
                Surname              = _Surname,
                Address              = _Address,
                DateOfBirth          = _DateOfBirth,
                PhoneNumber          = _PhoneNumber,
                Password             = _Password,
                ConfirmationPassword = _ConfirmationPassword,
                Username             = _Username
            };

            Model.User r = null;
            r = await _service.Insert <Model.User>(req);

            if (r != null)
            {
                await _messageService.ShowAsync("Kreiranje računa uspješno izvršeno, molimo logirajte se za nastavak!");
            }
        }
Example #3
0
        public void SaveChanges(object projectObject)
        {
            EditingProjectViewModel viewModel = projectObject as EditingProjectViewModel;

            if (viewModel.IsValid)
            {
                Name      = viewModel.Name;
                Beginning = viewModel.Beginning;
                Deadline  = viewModel.Deadline;
                Info      = viewModel.Info;
                Navigation.PopAsync();
            }
            else
            {
                MessageService.ShowAsync("Please fill the empty fields");
            }
        }
 private async void ExecuteLogarAsync()
 {
     if (Email == "admin" && Senha == "123")
     {
         App.Current.MainPage = new TheShell();
     }
     else
     {
         await _messageService.ShowAsync("Email e/ou senha inválidos...");
     }
 }
        private async void SaveProject(object projectObject)
        {
            ProjectViewModel project = projectObject as ProjectViewModel;

            if (project != null && project.IsValid)
            {
                project.Trim();
                await projectManager.AddProjectAsync(project.Project);

                Projects.Add(project);
                Back();
            }
            else
            {
                //show nessage about problem
                Services.IMessageService MessageService = DependencyService.Get <Services.IMessageService>();
                await MessageService.ShowAsync("Please fill empty fields");
            }
        }