Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int order = Taxonomy_B.TaxList().Count();
         pagerCate.RecordCount = order;
         Bind();
     }
     if (!string.IsNullOrWhiteSpace(Request.QueryString["taxId"]))
     {
         if (Taxonomy_B.delTax(Request.QueryString["taxId"]))
         {
             ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('删除成功');location.href='AdminTax.aspx';</script>");
         }
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ddlcate.DataSource     = Taxonomy_B.TaxList();
         ddlcate.DataValueField = "TaxonomyId";
         ddlcate.DataTextField  = "TaxonomyName";
         ddlcate.DataBind();
         if (!string.IsNullOrWhiteSpace(Request.QueryString["postId"]))
         {
             Posts_M post = Posts_B.PostByID(Request.QueryString["postId"]);
             txtTitle.Text   = post.Title;
             ddlcate.Text    = post.TaxonomyId.ToString();
             postdesc.Text   = post.Post;
             btnaddpost.Text = "修改";
         }
     }
 }