コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(Request.QueryString["id"]);

            if (id > 0)
            {
                HttpCookie cookie = new HttpCookie("assocCookie");
                cookie.Value = id.ToString();
                Response.Cookies.Add(cookie);
                Response.Redirect("~/Site/Default.aspx");
            }

            PaginaInicialBLL  bll    = new PaginaInicialBLL();
            PaginaInicialType pagina = bll.select(Master.AssociacaoIdCookie);

            texto = pagina.Texto;
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int idAssociacao = Int32.Parse(Session["AssociacaoID"].ToString());

            PaginaInicialBLL  bll    = new PaginaInicialBLL();
            PaginaInicialType pagina = bll.select(Master.getAssociacaoSession().IdAssociacao);

            if (IsPostBack)
            {
                pagina.Texto = Request.Form["texto"].ToString();
                bll.save(pagina);

                Session["FlashMsg"]     = "Conteúdo atualizado com sucesso.";
                Session["FlashMsgType"] = "success";
            }
            texto = pagina.Texto;
        }