protected void InsertData() { ArticleInfo info = aBLL.GetDataByAid(id); info.ac_id = Tools.TryParseMethod(ddrCategory.SelectedValue); info.a_title = txtTitle.Text; info.a_detail = Ckeditorl1.Text; info.a_show = bool.Parse(rbShow.SelectedValue); info.a_editDate = DateTime.Now; info.a_img = hfImageIndex.Value; if (aBLL.Update(info) > 0) { Response.Redirect("~/Manager/Sysconfig/Default.aspx?header=" + Getmessage("30014")); } }
protected void Bind() { if (id != 0) { if (Tools.TryParseMethod(id.ToString()) > 0) { ArticleInfo info = aBLL.GetDataByAid(id); if (info.ac_id != 0) { lbCategory.Text = acBLL.getAllById(info.ac_id).ac_name; } lbTitle.Text = info.a_title; litContent.Text = info.a_detail; lbhits.Text = info.a_hits.ToString(); lbBuilddate.Text = info.a_ts.ToString("yyyy/MM/dd hh:mm"); lbEditDate.Text = info.a_editDate.ToString("yyyy/MM/dd hh:mm"); Image1.ImageUrl = Tools.GetAppSettings("ArticleTruePath") + info.a_img; if (info.a_show) { lbShow.Text = "顯示"; } else { lbShow.Text = "隱藏"; } rpImage.DataSource = aiBLL.GetDataByAid(id); rpImage.DataBind(); } } }