private void btnlogin_Click(object sender, RoutedEventArgs e)
        {
            /*Administracion adm = new Administracion();
             * adm.Owner = this;
             * adm.ShowDialog();*/

            // MessageBox.Show("Bienvenido " + txtnombre.Text);
            usuarioBLL usrbll = new usuarioBLL();
            bool       check  = usrbll.getLogin(txtnombre.Text, txtclave.Password);

            if (check)
            {
                int    rut    = usrbll.Getrut(txtnombre.Text, txtclave.Password);
                string nombre = usrbll.Get_nombrecompleto(rut);

                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.add;
                popup.ContentText       = "Bienvenido" + nombre;
                popup.AnimationDuration = 500;
                popup.Delay             = 3500;
                popup.Popup();
                Administracion adm = new Administracion();
                adm.lb_nombreusuario.Content = nombre;
                Close();
                adm.ShowDialog();
            }
            else
            {
                lb1.Content = "Credenciales o Rol Incorrectos, Intente nuevamente";
            }
        }
Example #2
0
        private void btnAceptar_Click(object sender, RoutedEventArgs e)
        {
            usuarioBLL usrbll = new usuarioBLL();
            bool       check  = usrbll.getLogin(txtUsuario.Text, pbContrasena.Password);

            if (check)
            {
                int    rut    = usrbll.Getrut(txtUsuario.Text, pbContrasena.Password);
                string nombre = usrbll.Get_nombrecompleto(rut);

                PopupNotifier popup = new PopupNotifier();
                popup.TitleText         = "Aviso";
                popup.Image             = Properties.Resources.add;
                popup.ContentText       = "Bienvenido" + nombre;
                popup.AnimationDuration = 500;
                popup.Delay             = 3500;
                popup.Popup();
                Bodega adm = new Bodega();
                adm.lblUser.Content = nombre;
                Close();
                adm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Credenciales o Rol Incorrectos \n Intente nuevamente");
            }
        }