protected void Page_Load(object sender, EventArgs e) { Utilitarios utilitarios = new Utilitarios(); if (!IsPostBack) { ClubDropDownList.DataSource = Clubes.Listar("IdClub, Nombre", "1=1 and IdUsuario = " + utilitarios.ObjectToInt(Session["IdUsuario"].ToString())); ClubDropDownList.DataTextField = "Nombre"; ClubDropDownList.DataValueField = "IdClub"; ClubDropDownList.DataBind(); } }
private void BindClubList() { DataConnection myConnection = new DataConnection(); String script = "Select RegNum,ClubName from Clubs"; ClubDropDownList.DataSource = myConnection.ExecuteScript(script); ClubDropDownList.DataTextField = "ClubName"; ClubDropDownList.DataValueField = "RegNum"; ClubDropDownList.DataBind(); if (ClubDropDownList.DataSource == null) { btnAddPlayer.Visible = false; } else { btnAddPlayer.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { Utilitarios ut = new Utilitarios(); if (!IsPostBack) { ClubDropDownList.DataSource = Clubes.Listar("IdClub, Nombre", " 1=1 and IdUsuario = " + ut.ObjectToInt(Session["IdUsuario"].ToString())); ClubDropDownList.DataTextField = "Nombre"; ClubDropDownList.DataValueField = "IdClub"; ClubDropDownList.DataBind(); if (Request.QueryString["IdMiembro"] != null) { Session["IdMiembro"] = Request.QueryString["IdMiembro"]; EliminarButton.Visible = true; Buscar(); } } }
protected void Page_Load(object sender, EventArgs e) { Utilitarios ut = new Utilitarios(); if (!IsPostBack) { ClubDropDownList.DataSource = Clubes.Listar("IdClub, Nombre", "1=1 and Idusuario = " + ut.ObjectToInt(Session["IdUsuario"].ToString())); ClubDropDownList.DataTextField = "Nombre"; ClubDropDownList.DataValueField = "IdClub"; ClubDropDownList.DataBind(); CargarMiembros(); TipoDropDownList.DataSource = TipoDocumentos.Listar("1=1", "IdTipoDocumento, Descripcion"); TipoDropDownList.DataTextField = "Descripcion"; TipoDropDownList.DataValueField = "IdTipoDocumento"; TipoDropDownList.DataBind(); CargarDeudas(); } }