Esempio n. 1
0
        /// <summary>
        /// Metodo Privado para Autenticar
        /// </summary>
        private void Autentica()
        {
            Login obj = new Login();

            if (obj.Autenticar(txtUsuario.Text, txtContrasena.Text))
            {
                if (Global.tipousuarioid == "1")
                {
                    this.Hide();
                    frmAdminPrincipal f = new frmAdminPrincipal();
                    f.ShowDialog();
                    this.Close();
                }
                else
                {
                    this.Hide();
                    frmPrincipal f = new frmPrincipal();
                    f.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Usuario o Password Incorrectos, Intente de Nuevo");
                txtContrasena.Text = "";
            }
        }
Esempio n. 2
0
        private void btnregresar_Click(object sender, EventArgs e)
        {
            frmPrincipal fp = new frmPrincipal();

            this.Hide();
            fp.ShowDialog();
            this.Close();
        }
        private void tsmmenuprincipal_Click(object sender, EventArgs e)
        {
            Global.eventoActivo = 0;
            frmPrincipal fp = new frmPrincipal();

            this.Hide();
            fp.ShowDialog();
            this.Close();
        }