Пример #1
0
    public void CargarInfprof(int cod)
    {
        List <ListItem> list = new List <ListItem>();

        try{
            OracleConnection conn = con.crearConexion();
            OracleCommand    cmd  = null;
            if (conn != null)
            {
                string sql = "select CONCAT(CONCAT(usu_nombre, ' '), usu_apellido) as nombre, usu_telefono, usu_correo, usu_username from usuario  where usu_username='******'";

                cmd             = new OracleCommand(sql, conn);
                cmd.CommandType = CommandType.Text;
                using (OracleDataReader reader = cmd.ExecuteReader())
                {
                    DataTable dataTable = new DataTable();
                    dataTable.Load(reader);
                    GVinfprof.DataSource = dataTable;
                }
                GVinfprof.DataBind();
            }
            conn.Close();
        }
        catch (Exception ex)
        {
            Linfo.Text = "Error al cargar la lista: " + ex.Message;
        }
    }
    private void CargarInfoProfesor()
    {
        List <ListItem> list = new List <ListItem>();

        try
        {
            OracleConnection conn = con.crearConexion();
            OracleCommand    cmd  = null;
            if (conn != null)
            {
                string sql = "select usu_username,usu_telefono, usu_direccion, usu_correo  from usuario  where usu_username='******'";
                cmd             = new OracleCommand(sql, conn);
                cmd.CommandType = CommandType.Text;
                using (OracleDataReader reader = cmd.ExecuteReader())
                {
                    DataTable dataTable = new DataTable();
                    dataTable.Load(reader);
                    GVinfprof.DataSource = dataTable;
                }
                GVinfprof.DataBind();
            }
            conn.Close();
        }
        catch (Exception ex)
        {
            Linfo.Text = "Error al cargar la lista: " + ex.Message;
        }
    }
Пример #3
0
    private void CargarInfoProfesor()
    {
        try{
            OracleConnection conn = con.crearConexion();
            OracleCommand    cmd  = null;
            if (conn != null)
            {
                string sql = "select usu_username, CONCAT(CONCAT(usu_nombre, ' '),usu_apellido) as NOMBRE,  usu_correo  from usuario  where usu_username='******'";

                cmd             = new OracleCommand(sql, conn);
                cmd.CommandType = CommandType.Text;
                using (OracleDataReader reader = cmd.ExecuteReader())
                {
                    DataTable dataTable = new DataTable();
                    dataTable.Load(reader);
                    GVinfprof.DataSource = dataTable;
                }
                GVinfprof.DataBind();
            }
            conn.Close();
        }
        catch (Exception ex)
        {
            Linfo.Text = "Error al cargar la lista: " + ex.Message;
        }
    }