private void cargar_DropDownList_CLASE(String idDivision) { DropDownList_CLASE.Items.Clear(); clase _clase = new clase(Session["idEmpresa"].ToString()); DataTable tablaClases = _clase.ObtenerClasesPorIdDivision(idDivision); ListItem item = new ListItem("Seleccione Clase", ""); DropDownList_CLASE.Items.Add(item); foreach (DataRow fila in tablaClases.Rows) { item = new ListItem(fila["ID_CLASE"].ToString() + " - " + fila["NOMBRE"].ToString(), fila["ID_CLASE"].ToString()); DropDownList_CLASE.Items.Add(item); } DropDownList_CLASE.DataBind(); }
private void cargar_GridView_CLASES(String ID_DIVISION) { clase _clase = new clase(Session["idEmpresa"].ToString()); DataTable tablaInfo = _clase.ObtenerClasesPorIdDivision(ID_DIVISION); if (tablaInfo.Rows.Count <= 0) { if (_clase.MensajError != null) { Informar(Panel_FONDO_MENSAJE_SECCION, Image_MENSAJE_SECCION_POPUP, Panel_MENSAJE_SECCION, Label_MENSAJE_SECCION, _clase.MensajError, Proceso.Error); } else { Informar(Panel_FONDO_MENSAJE_SECCION, Image_MENSAJE_SECCION_POPUP, Panel_MENSAJE_SECCION, Label_MENSAJE_SECCION, "ADVERTENCIA: No se encontró información de CLASES asociadas a la DIVISIÓN seleccionada.", Proceso.Error); } GridView_CLASES.DataSource = null; GridView_CLASES.DataBind(); } else { cargar_GridView_CLASES_desde_tabla(tablaInfo); admin_columnas_grilla(GridView_CLASES, true, true, true, false); } }