private void BindComboBolao() { //Carregando todos os bolões do usuário Business.Users.Support.User user = new BolaoNet.Business.Users.Support.User(UserBasePage.CurrentUserName); user.UserName = UserBasePage.CurrentUserName; IList <BolaoNet.Model.Users.UserBoloes> boloes = user.LoadBoloes(); DropDownList cboBolao = (DropDownList)this.LoginViewMenuRigth.FindControl("cboBolao"); //Inserindo os bolões no combo cboBolao.Items.Add("<Selecione>"); foreach (BolaoNet.Model.Users.UserBoloes entry in boloes) { cboBolao.Items.Add(entry.Bolao.Nome); //Se já existe um bolão selecionado if (BolaoUserBasePage.CurrentBolao != null) { //Se encontrou o bolão selecionado, seleciona-se a entrada if (string.Compare(BolaoUserBasePage.CurrentBolao.Nome, entry.Bolao.Nome, true) == 0) { cboBolao.Items[cboBolao.Items.Count - 1].Selected = true; } } //endif currentbolao } //end foreach }
public void BindMeusBoloes() { Business.Users.Support.User user = new BolaoNet.Business.Users.Support.User(base.UserName); user.UserName = base.UserName; IList <BolaoNet.Model.Users.UserBoloes> list = user.LoadBoloes(); this.grdMeusBoloes.DataSource = list; this.grdMeusBoloes.DataBind(); }
private void BindList() { //Business.Boloes.Bolao business = new Business.Boloes.Bolao(base.UserName); //IList<Framework.DataServices.Model.EntityBaseData> list = business.SelectAll(null); Business.Users.Support.User business = new BolaoNet.Business.Users.Support.User(base.UserName, base.UserName); IList <BolaoNet.Model.Users.UserBoloes> list = business.LoadBoloes(); this.dtlBolao.DataSource = list; this.dtlBolao.DataBind(); }