Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (BolaoUserBasePage.CurrentBolao != null)
                {
                    string campeonatoImage = "~/Images/Database/Boloes/" +
                                             BolaoUserBasePage.CurrentBolao.Nome + ".jpg";

                    //if (System.IO.File.Exists(campeonatoImage))
                    //{
                    //    campeonatoImage = "~/Images/Database/Campeonatos/" +
                    //        "noimage.jpg";
                    //}

                    this.lblNomeBolao.Text       = BolaoUserBasePage.CurrentBolao.Nome;
                    this.imgBolao.ImageUrl       = campeonatoImage;
                    this.imgBolao.DescriptionUrl = BolaoUserBasePage.CurrentBolao.Nome;



                    Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(
                        UserBasePage.CurrentUserName, BolaoUserBasePage.CurrentBolao.Nome);

                    this.mnuBolaoAux.Visible = !business.IsUserInBolao(
                        new Framework.Security.Model.UserData(UserBasePage.CurrentUserName));
                }
            }
        }