Exemplo n.º 1
0
 protected void btn_add_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         string ids = Request.QueryString["id"].ToString();
         if (ids != "0")
         {
             zs.Model.Tbl_Page model = bll.GetModel(int.Parse(ids));
             model.name            = this.tb_name.Text.Trim();
             model.metatags        = this.tb_tags.Text.Trim();
             model.metadescription = ApplicationMethod.NoHtmlCode(this.tb_metadesc.Text.Trim(), 80);
             model.conts           = Request.Form["myValue"].ToString();
             bll.Update(model);
             BindData();
         }
         else
         {
             zs.Model.Tbl_Page model = new zs.Model.Tbl_Page();
             model.name            = this.tb_name.Text.Trim();
             model.metatags        = this.tb_tags.Text.Trim();
             model.metadescription = ApplicationMethod.NoHtmlCode(this.tb_metadesc.Text.Trim(), 80);
             model.conts           = Request.Form["myValue"].ToString();
             bll.Add(model);
         }
     }
 }
Exemplo n.º 2
0
    private void GetContent()
    {
        zs.BLL.Tbl_News bll = new zs.BLL.Tbl_News();
        string          id  = ApplicationMethod.decript(Request.QueryString["id"]);

        zs.Model.Tbl_News model = bll.GetModelByCache(int.Parse(id));
        this.lb_title.Text = model.title;
        this.lb_Cont.Text  = model.conts;
        tags       = "浙江树人大学,招生网,树大招生," + model.title;
        desc       = ApplicationMethod.NoHtmlCode(model.conts, 80);
        Page.Title = model.title + " - 浙江树人大学招生网";
    }
Exemplo n.º 3
0
    private void InitData()
    {
        string id = ApplicationMethod.decript(Request.QueryString["id"].ToString());

        zs.Model.Tbl_Xueyuan model = bll.GetModelByCache(int.Parse(id));
        name                      = model.name;
        nameen                    = model.nameen;
        conts                     = model.conts;
        yuanzhang                 = model.yuanzhang;
        image1                    = model.image1;
        image2                    = model.image2;
        image3                    = model.image3;
        tags                      = "浙江树人大学招生网," + model.name;
        desc                      = ApplicationMethod.NoHtmlCode(model.conts, 80);
        xid                       = ApplicationMethod.encript(model.id.ToString());
        this.Page.Title           = model.name + " - 浙江树人大学招生网";
        this.Repeater1.DataSource = bll.GetList(2, "", "newid()");
        this.Repeater1.DataBind();
    }