Ejemplo n.º 1
0
        private void BindBoloesDisponiveis()
        {
            Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);

            IList <Framework.DataServices.Model.EntityBaseData> list =
                business.SelectAllEnabled(null);


            if (ViewState["MeusBoloes"] != null)
            {
                IList <Framework.DataServices.Model.EntityBaseData> meusBoloesList =
                    (IList <Framework.DataServices.Model.EntityBaseData>)ViewState["MeusBoloes"];


                for (int c = 0; c < list.Count; c++)
                {
                    Model.Boloes.Bolao bolaoCorrente = (Model.Boloes.Bolao)list[c];

                    foreach (Model.Boloes.Bolao meuBolao in meusBoloesList)
                    {
                        if (string.Compare(meuBolao.Nome, bolaoCorrente.Nome, true) == 0)
                        {
                            list.RemoveAt(c);
                            c--;
                            break;
                        }
                    }
                }
            }


            this.dtlBolaoDisponiveis.DataSource = list;
            this.dtlBolaoDisponiveis.DataBind();
        }