示例#1
0
        public async void ValidateLogin()
        {
            if (!String.IsNullOrEmpty(uxUsernameTextBox.Text) && !String.IsNullOrEmpty(uxPasswordTextBox.Password))
            {
                var validLoginRequest = await ValidateLoginRequest.SendValidateLoginRequest(uxUsernameTextBox.Text, uxPasswordTextBox.Password);

                if (validLoginRequest)
                {
                    this.Frame.Navigate(typeof(HomeScreen), null);
                }
                else
                {
                    ContentDialog responseAlert = new ContentDialog
                    {
                        Title           = "Incorrect Username/Password",
                        Content         = "No Employee user was found with that username and password",
                        CloseButtonText = "Ok"
                    };
                    ContentDialogResult result = await responseAlert.ShowAsync();
                }
            }
            else
            {
                ContentDialog responseAlert = new ContentDialog
                {
                    Title           = "Username or Password cannot be empty",
                    Content         = "",
                    CloseButtonText = "Ok"
                };
                ContentDialogResult result = await responseAlert.ShowAsync();
            }
        }
示例#2
0
		public void ValidateLogin(BaseHandler callback)
		{
			ValidateLoginRequest req = new ValidateLoginRequest(this, callback);
			req.ValidateLogin();
		}