private void Llenar_DDLRegional() { DB_Regional reg = new DB_Regional(); List <Regional> Lista = reg.DB_Desplegar_REGIONAL(); DDLRegional.DataSource = Lista; DDLRegional.DataValueField = "Id_Regional"; DDLRegional.DataTextField = "Nombre"; DDLRegional.DataBind(); }
protected void Desplegar_REGIONAL() { DB_Regional r = new DB_Regional(); List <Regional> listaR = r.DB_Desplegar_REGIONAL(); DDLRegional.DataSource = listaR; DDLRegional.DataValueField = "Id_Regional"; DDLRegional.DataTextField = "Nombre"; DDLRegional.DataBind(); DDLRegional.Items.Insert(0, new ListItem("Seleccione la Regional", "0", true)); }
private void Llenar_DDLRegional() { DB_AdminUser User = new DB_AdminUser(); DataTable dt = User.DB_Desplegar_USUARIO(LblIdUser.Text); if (Convert.ToInt32(dt.Rows[0][6].ToString()) == 15 || Convert.ToInt32(dt.Rows[0][6].ToString()) == 5) { DDLRegional.Items.Insert(0, new ListItem(dt.Rows[0][5].ToString(), dt.Rows[0][4].ToString(), true)); DDLRegional.Enabled = false; } else { DB_Regional reg = new DB_Regional(); List <Regional> Lista = reg.DB_Desplegar_REGIONAL(); DDLRegional.DataSource = Lista; DDLRegional.DataValueField = "Id_Regional"; DDLRegional.DataTextField = "Nombre"; DDLRegional.DataBind(); } }
private void Llenar_DDLRegional() { DB_AdminUser User = new DB_AdminUser(); //DataTable dt = User.DB_Desplegar_USUARIO(LblIdUsuario.Text); ////LblReg.Text = dt.Rows[0][13].ToString(); //if (Convert.ToInt32(dt.Rows[0][6].ToString()) == 15 || Convert.ToInt32(dt.Rows[0][6].ToString()) == 5) //{ // DDLRegional.Items.Insert(0, new ListItem(dt.Rows[0][5].ToString(), dt.Rows[0][4].ToString(), true)); // DDLRegional.Enabled = false; //} //else //{ DB_Regional reg = new DB_Regional(); List <Regional> Lista = reg.DB_Desplegar_REGIONAL(); DDLRegional.DataSource = Lista; DDLRegional.DataValueField = "Id_Regional"; DDLRegional.DataTextField = "Nombre"; DDLRegional.DataBind(); DDLRegional.Items.Insert(0, new ListItem("Seleccione la Regional", "0", true)); //} }