Beispiel #1
0
        private void btnIniciarSesion_Click(object sender, EventArgs e)
        {
            if (Encriptador.CompararMD5(txtpassword.Text, cmbUsuario.SelectedValue.ToString()))
            {
                Appuser c = (Appuser)cmbUsuario.SelectedItem;

                if (c.userType)
                {
                    RegistroDAO.iniciarSesion(c.username);

                    MessageBox.Show("¡Bienvenido!",
                                    "apphugo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    frmPrincipal ventana = new frmPrincipal();
                    ventana.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("¡Bienvenido!", "hugoapp",
                                MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            frmPrincipal aventana = new frmPrincipal();

            aventana.Show();
            this.Hide();
        }