Example #1
0
        private void Login()
        {
            MainWindow objM = new MainWindow();

            string user     = txtUsuario.Text.Trim();
            string password = txtPassword.Password.Trim();

            /*Webservice*/
            var response = _usuarioService.GetValidarUsuario(user, password);


            if (response == null)
            {
                MessageBox.Show("Usuario y/o Contraseña inválidos");
            }
            else
            {
                Application.Current.Resources["UserData"] = response;
                objM.Show();
                this.Hide();
            }
        }