Esempio n. 1
0
        private void btnVolver_Click(object sender, EventArgs e)
        {
            this.Hide();
            FrmCallCenterPrincipal frmCallCenterPrincipal = new FrmCallCenterPrincipal();

            frmCallCenterPrincipal.ShowDialog();
        }
Esempio n. 2
0
        private void BtnIngresar_Click_1(object sender, EventArgs e)
        {
            conexion.ConnectionString = "server=localhost; database=check - on; Uid=root; Pwd = ; SslMode=none;";
            conexion.Open();

            MySqlCommand comando = new MySqlCommand();

            comando.Connection = conexion;

            comando.CommandText = "select *from user where IdUser = '******' and Password = '******'";

            MySqlDataReader leer = comando.ExecuteReader();

            if (leer.Read())
            {
                MessageBox.Show("Bienvenido " + leer["NameUser"].ToString());

                if (leer["TypeUser"].ToString() == "Asesor aerolínea")
                {
                    this.Hide();
                    FrmAsesorPrincipal frmAsesorPrincipal = new FrmAsesorPrincipal();
                    frmAsesorPrincipal.ShowDialog();
                }
                else
                {
                    this.Hide();
                    FrmCallCenterPrincipal frmCallCenterPrincipal = new FrmCallCenterPrincipal();
                    frmCallCenterPrincipal.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Usuario o contraseña incorrecta");
            }
            conexion.Close();
        }