예제 #1
0
        private void entrar_Click(object sender, EventArgs e)
        {
            string user = NomUsuario.Text;//Request["user"];
            string contrasennia = password.Text;//Request["password"];
            string database = BD.Text;//Request["database"];

            Conexion_Oracle oracle = new Conexion_Oracle(user, database, contrasennia);
            try
            {
                oracle.myConnection.Open();
                Administrador frm = new Administrador(oracle,null);
                frm.Show();
                this.Hide();

            }
            catch (Exception ex)
            {
                MessageBox.Show("No hubo conexión, intentelo nuevamente"+ex.ToString());
            }
        }
예제 #2
0
        private void entrar_Click(object sender, EventArgs e)
        {
            String user = nomUsuario.Text;
            String pass = password.Text;
            String nbase = txtbase.Text;

            Conexion_MSS conexion = new Conexion_MSS(user, pass, nbase, tipo);
            try
            {

                conexion.conexion.Open();
                Administrador frm = new Administrador(null,conexion);
                frm.Show();
                this.Hide();

            }
            catch (Exception ex)
            {
                MessageBox.Show("No hubo conexión, intentelo nuevamente" + ex.ToString());
            }
        }