public static List <BE_Nivel> Listar_Nivel(BE_Nivel pBE_Nivel) { IDataReader DataReader = null; List <BE_Nivel> oBE_Nivel = new List <BE_Nivel>(); try { SqlCommand cmd = (SqlCommand)db.GetStoredProcCommand("USP_SEL_NIVEL"); //db.AddInParameter(cmd, "@texto_buscar", DbType.String, pBE_Nivel.Str_texto_buscar); cmd.CommandTimeout = Convert.ToInt32(DuracionConexion.corta); using (DataReader = db.ExecuteReader(cmd)) { while (DataReader.Read()) { oBE_Nivel.Add(new BE_Nivel(DataReader, 1)); } } return(oBE_Nivel); } catch (Exception ex) { throw ex; } finally { if (!DataReader.IsClosed) { DataReader.Close(); } } }
public static List <BE_Nivel> Listar_Nivel(BE_Nivel pBE_Nivel) { try { return(DA_Nivel.Listar_Nivel(pBE_Nivel)); } catch (Exception ex) { throw ex; } }
public void Listar_Nivel() { List <BE_Nivel> Lista_Nivel = new List <BE_Nivel>(); pBE_Nivel = new BE_Nivel(); pBL_Nivel = new BL_Nivel(); Lista_Nivel = BL_Nivel.Listar_Nivel(pBE_Nivel); cbo_Operador_nivel.ValueMember = "ID"; cbo_Operador_nivel.DisplayMember = "Str_Desc_Nivel"; cbo_Operador_nivel.DataSource = Lista_Nivel; }