protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                IList <Framework.DataServices.Model.EntityBaseData> list = bolao.LoadMembros();

                this.cboUsuarios.DataSource     = list;
                this.cboUsuarios.DataTextField  = "UserName";
                this.cboUsuarios.DataValueField = "UserName";
                this.cboUsuarios.DataBind();



                Business.Campeonatos.Support.Campeonato business = new BolaoNet.Business.Campeonatos.Support.Campeonato(base.UserName);

                business.Nome = CurrentCampeonato.Nome;

                this.cboGrupo.DataSource     = business.LoadGrupos();
                this.cboGrupo.DataTextField  = "Nome";
                this.cboGrupo.DataValueField = "Nome";
                this.cboGrupo.DataBind();


                this.cboFase.DataSource     = business.LoadFases();
                this.cboFase.DataTextField  = "Nome";
                this.cboFase.DataValueField = "Nome";
                this.cboFase.DataBind();
            }//endif ispostback



            BindGrid();
        }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            if (!IsPostBack)
            {
                //for (int c = 0; c < 17; c++)
                //    this.grdClassificacao.Columns[c + 4].Visible = false;

                for (int c = 0; c < 18; c++)
                {
                    this.grdClassificacao.Columns[c + 5].Visible = false;
                }


                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                IList <Framework.DataServices.Model.EntityBaseData> list = business.LoadCriteriosPontos(null);

                //IList<Model.Boloes.BolaoCriterioPontos> criterios = new List<Model.Boloes.BolaoCriterioPontos>();

                foreach (Model.Boloes.BolaoCriterioPontos criterio in list)
                {
                    if (criterio.Pontos > 0)
                    {
                        //criterios.Add(criterio);

                        //this.grdClassificacao.Columns[3 + (int)criterio.CriterioID].Visible = true;
                        this.grdClassificacao.Columns[4 + (int)criterio.CriterioID].Visible = true;
                    }
                }

                this.grdClassificacao.Columns[this.grdClassificacao.Columns.Count - 1].Visible = true;
            }

            base.OnLoad(e);
        }
Ejemplo n.º 3
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));
                }
            }
        }
Ejemplo n.º 4
0
        private void ShowBolaoData()
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            bolao.Load();


            this.lblStatus.Text      = bolao.IsIniciado ? "Iniciado" : "Aguardando Início";
            this.lblIniciadoPor.Text = bolao.IniciadoBy;

            if (bolao.DataIniciado != DateTime.MinValue)
            {
                this.lblDataInicio.Text = bolao.DataIniciado.ToString("dd/MM/yyyy HH:mm:ss");
            }
            else
            {
                this.lblDataInicio.Text = "-";
            }


            if (bolao.IsIniciado)
            {
                this.btnIniciar.Enabled = false;
                this.btnVoltar.Enabled  = true;
            }
            else
            {
                this.btnIniciar.Enabled = true;
                this.btnVoltar.Enabled  = false;
            }
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                IList <Framework.DataServices.Model.EntityBaseData> list = business.LoadMembros();


                DropDownList cboUsers = (DropDownList)this.MultiViewType.FindControl("cboUsers");

                cboUsers.DataSource = list;
                cboUsers.DataBind();



                business.Load();

                if (business.IsIniciado && business.ApostasApenasAntes)
                {
                    this.btnSalvarExisting.Enabled = false;
                    this.btnSalvarNew.Enabled      = false;
                }
                else
                {
                    this.btnSalvarExisting.Enabled = true;
                    this.btnSalvarNew.Enabled      = true;
                }
            }
        }
Ejemplo n.º 6
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();
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            this.ctlMenuTools.ButtonClick           += new CommandEventHandler(ctlMenuTools_ButtonClick);
            this.ctlNavigateHomeControl.ButtonClick += new CommandEventHandler(ctlNavigateHomeControl_ButtonClick);

            //Atualizando o bolão que está sendo analisado
            Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(
                base.UserName, CurrentBolao.Nome);

            business.Load();
            CurrentBolao = business;


            //if (CurrentBolao.ApostasApenasAntes && CurrentBolao.IsIniciado)
            //{
            //    this.ctlMenuTools.SaveVisible = false;
            //    //this.btnSave.Visible = false;
            //}
            //else
            //{
            //    this.ctlMenuTools.SaveVisible = true;
            //    //this.btnSave.Visible = true;
            //}
        }
Ejemplo n.º 8
0
        protected override void  OnInit(EventArgs e)
        {
            this.ctlMenuTools.ButtonClick           += new CommandEventHandler(ctlMenuTools_ButtonClick);
            this.ctlNavigateHomeControl.ButtonClick += new CommandEventHandler(ctlNavigateHomeControl_ButtonClick);


            //Atualizando o bolão que está sendo analisado
            Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(
                base.UserName, CurrentBolao.Nome);

            business.Load();
            CurrentBolao = business;


            if (CurrentBolao.ApostasApenasAntes && CurrentBolao.IsIniciado)
            {
                this.MultiViewAuto.ActiveViewIndex = 1;
                this.ctlMenuTools.SaveVisible      = false;
            }
            else
            {
                this.ctlMenuTools.SaveVisible      = true;
                this.MultiViewAuto.ActiveViewIndex = 0;
            }
        }
        protected void grdClassificacao_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (string.IsNullOrEmpty(e.CommandName))
            {
                return;
            }

            bool found = false;

            for (int c = 0; c < this.DataSelected.Count; c++)
            {
                if (string.Compare(this.DataSelected[c].UserName, e.CommandName, true) == 0)
                {
                    found = true;
                    break;
                }
            }


            if (!found)
            {
                Model.Boloes.BolaoMembros newEntry = new Model.Boloes.BolaoMembros(e.CommandName);
                newEntry.FullName = e.CommandArgument.ToString();
                //this.DataSelected.Add(newEntry);

                Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);
                bolao.Nome = BolaoUserBasePage.CurrentBolao.Nome;
                bolao.InsertGrupoMembro(new Framework.Security.Model.UserData(base.UserName), newEntry);
            }

            BindSelected();
        }
Ejemplo n.º 10
0
        protected void grdJogos_DataBinding(object sender, EventArgs e)
        {
            switch (ModeList)
            {
            case Mode.Apostas:
            case Mode.ApostasReadOnly:
            case Mode.JogosBolao:


                if (Pontuacoes == null)
                {
                    Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(
                        UserBasePage.CurrentUserName, BolaoUserBasePage.CurrentBolao.Nome);

                    IList <Framework.DataServices.Model.EntityBaseData> list = bolao.SelectPontuacao();

                    Pontuacoes = new List <BolaoNet.Model.Boloes.BoloesPontuacao>();
                    Pontuacoes.Clear();

                    foreach (Model.Boloes.BoloesPontuacao pontos in list)
                    {
                        Pontuacoes.Add(pontos);
                    }
                }


                break;
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                IList <Framework.DataServices.Model.EntityBaseData> list = bolao.LoadMembros();

                this.cboUsuarios.DataSource     = list;
                this.cboUsuarios.DataTextField  = "UserName";
                this.cboUsuarios.DataValueField = "UserName";
                this.cboUsuarios.DataBind();


                this.cboUsuarios.SelectedValue  = base.UserName;
                this.lblUsuarioSelecionado.Text = base.UserName;

                //for (int c = 0; c < this.cboUsuarios.Items.Count; c++)
                //{
                //    if (string.Compare(this.cboUsuarios.Items[0].Text, base.UserName, true) == 0)
                //    {
                //        this.cboUsuarios.Items[c].Selected = true;
                //        break;
                //    }
                //}


                lnkDownloaApostas.NavigateUrl = "~/Boloes/DownloadApostas.aspx?Bolao=" + CurrentBolao.Nome + "&UserName="******"Target", "_blank");
        }
        private void BindMembros()
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            IList <Framework.DataServices.Model.EntityBaseData> list = bolao.LoadMembros();

            this.grdUserBolao.DataSource = list;
            this.grdUserBolao.DataBind();
        }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao("thoris", "Copa do Mundo 2010");
            bolao.LoadAllPontosDataByUser(new Framework.Security.Model.UserData("Thoris"));



            this.lblSqlServerCnnStr.Text = System.Configuration.ConfigurationManager.ConnectionStrings["DBProvider"].ConnectionString;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                this.cboUsuario.DataSource = business.LoadMembros();
                this.cboUsuario.DataBind();
            }

            BindChart();
        }
        private void BindGridTimes()
        {
            Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            IList <Framework.DataServices.Model.EntityBaseData> list = business.LoadCriteriosPontosTimes(null);

            this.grdTimes.DataSource = list;
            this.grdTimes.DataBind();


            ViewState["GridTimes"] = list;
        }
Ejemplo n.º 16
0
        private void BindUsers()
        {
            Business.Boloes.Support.Bolao membros = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            IList <Framework.DataServices.Model.EntityBaseData> users = membros.LoadMembros();

            this.cboUser.Items.Add("<Escolha>");
            foreach (Framework.Security.Model.UserData user in users)
            {
                this.cboUser.Items.Add(user.UserName);
            }
        }
Ejemplo n.º 17
0
        protected void cboBolao_SelectedIndexChanged(object sender, EventArgs e)
        {
            //Buscando os controles a serem gerenciados
            DropDownList cboCampeonato = (DropDownList)this.LoginViewMenuRigth.FindControl("cboCampeonato");
            DropDownList cboBolao      = (DropDownList)this.LoginViewMenuRigth.FindControl("cboBolao");

            //Apagando os jogos do campeonato
            ClearJogosCampeonato();


            //Se foi retirada a seleção do bolão
            if (cboBolao.SelectedIndex == 0)
            {
                //Zerando o conteúdo dos dados
                BolaoUserBasePage.CurrentBolao           = null;
                CampeonatoUserBasePage.CurrentCampeonato = null;

                cboCampeonato.SelectedIndex = 0;


                Response.Redirect("~/Users/Home.aspx");
            }
            //Se selecionou um registro na combo
            else
            {
                //Carregando dados do bolão
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(
                    UserBasePage.CurrentUserName, cboBolao.Text);

                business.Load();

                //Atribuindo as alterações para a memória
                BolaoUserBasePage.CurrentBolao           = (Model.Boloes.Bolao)business;
                BolaoUserBasePage.CurrentCampeonato      = business.Campeonato;
                CampeonatoUserBasePage.CurrentCampeonato = business.Campeonato;

                //Atribuindo o campeonato selecionado
                cboCampeonato.SelectedValue = business.Campeonato.Nome;


                //Armazenando os dados no profile
                Business.Profile.CustomProfile profile = Business.Profile.CustomProfile.GetProfile();
                profile.NomeBolao      = cboBolao.Text;
                profile.NomeCampeonato = cboCampeonato.Text;
                profile.Save();


                //ShowJogosCampeonato(business.Campeonato.Nome);



                Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri);
            }//endif encontrou registro selecionado
        }
        private void BindRequests()
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            IList <Framework.DataServices.Model.EntityBaseData> list = bolao.SelectRequestsPendentesByBolao(null);

            this.grdRequests.DataSource = list;
            this.grdRequests.DataBind();


            ViewState["RequestList"] = list;
        }
Ejemplo n.º 19
0
        private void BindMeusBoloes()
        {
            Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);

            IList <Framework.DataServices.Model.EntityBaseData> list =
                business.LoadBoloes(new Framework.Security.Model.UserData(base.UserName));

            this.dtlBolao.DataSource = list;
            this.dtlBolao.DataBind();

            ViewState["MeusBoloes"] = list;
        }
Ejemplo n.º 20
0
        public bool SelectBolao(string nomeBolao)
        {
            DropDownList cboBolao      = (DropDownList)this.LoginViewMenuRigth.FindControl("cboBolao");
            DropDownList cboCampeonato = (DropDownList)this.LoginViewMenuRigth.FindControl("cboCampeonato");

            //Apagando os jogos do usuário
            ClearJogosCampeonato();

            //Buscando em todos os items do bolão
            for (int c = 0; c < cboBolao.Items.Count; c++)
            {
                //Se encontrou o bolão
                if (string.Compare(cboBolao.Items[c].Value, nomeBolao, true) == 0)
                {
                    //Atribuindo o bolão
                    cboBolao.SelectedValue = nomeBolao;

                    //ShowJogosCampeonato(nomeBolao);

                    //Se o usuário está autenticado
                    if (HttpContext.Current.User.Identity.IsAuthenticated)
                    {
                        Business.Profile.CustomProfile profile = Business.Profile.CustomProfile.GetProfile(UserBasePage.CurrentUserName);
                        profile.NomeBolao = nomeBolao;
                        profile.Save();
                    }//endif usuário autenticado


                    //Buscando os detalhes do registro
                    Business.Boloes.Support.Bolao entry =
                        new BolaoNet.Business.Boloes.Support.Bolao(UserBasePage.CurrentUserName, nomeBolao);
                    entry.Load();


                    //Atribuindo os dados do usuário nas combos
                    BolaoUserBasePage.CurrentBolao           = (Model.Boloes.Bolao)entry;
                    BolaoUserBasePage.CurrentCampeonato      = entry.Campeonato;
                    CampeonatoUserBasePage.CurrentCampeonato = entry.Campeonato;
                    cboCampeonato.SelectedValue = entry.Campeonato.Nome;



                    //indicando que encontrou o bolão
                    return(true);
                } //endif encontrou o bolão
            }     //end for items

            //indicando que não conseguiu encontrar o bolão
            return(false);
        }
        private void BindSelected()
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);
            bolao.Nome = BolaoUserBasePage.CurrentBolao.Nome;


            IList <Model.Boloes.BolaoMembros> list = bolao.LoadClassificacaoGrupo(new Framework.Security.Model.UserData(base.UserName));
            IList <Framework.DataServices.Model.EntityBaseData> listPosicoes = bolao.SelectPremios();


            DataSelected = list;

            this.grdSelecionados.DataSource = list;
            this.grdSelecionados.DataBind();
        }
Ejemplo n.º 22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                IList <Framework.DataServices.Model.EntityBaseData> list = business.LoadMembros();


                this.cboUsers.DataSource     = list;
                this.cboUsers.DataTextField  = "UserName";
                this.cboUsers.DataValueField = "UserName";
                this.cboUsers.DataBind();

                this.cboUsers.Items.Insert(0, new ListItem("Todos", ""));
            }
        }
Ejemplo n.º 23
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.ctlFilterJogo.FilterChanged += new FilterJogo.FilterEventHandler(ctlFilterJogo_FilterChanged);


            //Atualizando o bolão que está sendo analisado
            if (BolaoUserBasePage.CurrentBolao != null)
            {
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(
                    UserBasePage.CurrentUserName, BolaoUserBasePage.CurrentBolao.Nome);

                business.Load();
                BolaoUserBasePage.CurrentBolao = business;
            }
        }
        protected void grdSelecionados_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            for (int c = 0; c < this.DataSelected.Count; c++)
            {
                if (string.Compare(this.DataSelected[c].UserName, e.CommandArgument.ToString(), true) == 0)
                {
                    Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);
                    bolao.Nome = BolaoUserBasePage.CurrentBolao.Nome;
                    bolao.DeleteGrupoMembro(new Framework.Security.Model.UserData(base.UserName), this.DataSelected[c]);

                    break;
                }
            }

            BindSelected();
        }
        private void BindChart()
        {
            if (ViewState["List"] == null)
            {
                return;
            }


            List <string> usuarios = (List <string>)ViewState["List"];

            this.ctlChart.Series.Clear();

            //Se não tem nenhuma informação de dados
            if (DataSourceRodada == null)
            {
                Business.Boloes.Support.Bolao business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
                DataSourceRodada = business.LoadHistoricoClassificacao();
            }//endif sem informações


            foreach (string usuario in usuarios)
            {
                //Criando os dados do time
                System.Web.UI.DataVisualization.Charting.Series timeSeries =
                    new System.Web.UI.DataVisualization.Charting.Series(usuario, this.cboUsuario.Items.Count);

                timeSeries.IsXValueIndexed     = true;
                timeSeries.IsValueShownAsLabel = true;
                timeSeries.ChartType           = System.Web.UI.DataVisualization.Charting.SeriesChartType.Line;

                this.ctlChart.Series.Add(timeSeries);


                //Buscando dados em todas as rodadas
                foreach (Model.Boloes.Reports.UserClassificacaoRodada rodada in DataSourceRodada)
                {
                    foreach (Model.Boloes.Reports.UserClassificacao classificacao in rodada.Membros)
                    {
                        if (string.Compare(classificacao.UserName, usuario, true) == 0)
                        {
                            timeSeries.Points.AddXY(rodada.Rodada, classificacao.Posicao);
                            break;
                        }
                    }
                }//endif buscando dados em todas as rodadas
            }
        }
        private void BindGrid()
        {
            Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName);
            bolao.Nome = BolaoUserBasePage.CurrentBolao.Nome;


            IList <Model.Boloes.BolaoMembros> list = bolao.LoadClassificacao(0);
            IList <Framework.DataServices.Model.EntityBaseData> listPosicoes = bolao.SelectPremios();


            ViewState["listPosicoes"] = listPosicoes;
            ViewState["list"]         = list;


            this.grdClassificacao.DataSource = list;
            this.grdClassificacao.DataBind();
        }
        protected void lnkRemover_Click(object sender, EventArgs e)
        {
            string nomeUser = ((LinkButton)sender).CommandArgument;

            Business.Boloes.Support.Bolao     business = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, CurrentBolao.Nome);
            Framework.Security.Model.UserData user     = new Framework.Security.Model.UserData(nomeUser);

            if (business.DeleteMembro(user))
            {
                base.ShowMessages(user + " removido do bolão com sucesso.");
            }
            else
            {
                base.ShowErrors(user + " com problemas para remover do bolão.");
            }

            BindMembros();
        }
Ejemplo n.º 28
0
        protected void grdJogosUsuarios_DataBinding(object sender, EventArgs e)
        {
            if (Pontuacoes == null)
            {
                Business.Boloes.Support.Bolao bolao = new BolaoNet.Business.Boloes.Support.Bolao(
                    base.UserName, CurrentBolao.Nome);

                IList <Framework.DataServices.Model.EntityBaseData> list = bolao.SelectPontuacao();

                Pontuacoes = new List <BolaoNet.Model.Boloes.BoloesPontuacao>();
                Pontuacoes.Clear();

                foreach (Model.Boloes.BoloesPontuacao pontos in list)
                {
                    Pontuacoes.Add(pontos);
                }
            }
        }
Ejemplo n.º 29
0
        private void WritePDF(string bolao, string userName)
        {
            Business.Boloes.Support.Bolao     bolaoModel = new BolaoNet.Business.Boloes.Support.Bolao(base.UserName, bolao);
            Framework.Security.Model.UserData userModel  = new Framework.Security.Model.UserData(userName);



            //Response.BinaryWrite(doc.DocContents);
            Response.ContentType = "application/pdf";
            Response.AppendHeader("Content-Disposition", "inline; filename=ParProcess.pdf;");
            //Response.AppendHeader("content-disposition", "attachment; filename=item.pdf" );


            Business.PDF.Support.CopaMundoPdfCreator pdfCreator = new BolaoNet.Business.PDF.Support.CopaMundoPdfCreator(base.UserName);
            pdfCreator.CreateApostasUser(Response.OutputStream,
                                         System.Web.HttpContext.Current.Request.PhysicalApplicationPath + "\\Images\\Database", bolaoModel, userModel);
            Response.End();
        }
Ejemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (BolaoUserBasePage.CurrentBolao != null)
                {
                    string campeonatoImage = "~/Images/Database/Boloes/" +
                                             BolaoUserBasePage.CurrentBolao.Nome + ".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);
                }
            }
        }