⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 discusstopi_commentaryedit.aspx.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
字号:
//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class user_discuss_discussTopi_commentaryEdit : NetCMS.Web.UI.UserPage
{
    NetCMS.Content.Discuss rd = new NetCMS.Content.Discuss();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
            string DtID = Request.QueryString["DtID"];
            string DisID = Request.QueryString["DisID"];
            if (DisID != null && DisID != "")
            {
                sc.InnerHtml = Show_sc(DtID, DisID);
                DataTable dt = rd.sel_discussInfo(DtID,14);
                if(dt!=null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        this.title.Text = dt.Rows[0]["title"].ToString();
                        if (dt.Rows[0]["title"].ToString().Trim() == "")
                        {
                            this.titleTF.Visible = false;
                        }
                        this.contentBox.Value = dt.Rows[0]["Content"].ToString();
                        this.DtIDs.Value = DtID;
                    }
                    dt.Clear(); dt.Dispose();
                }
            }
            else
            {
                PageError("错误的参数", "");
            }
        }
    }


    protected string Show_sc(string DidID, string DisID)
    {
        string sc = "<table width=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"toptable\"><tr><td height=\"1\" colspan=\"2\"></td></tr>";
        sc += "<tr><td width=\"57%\"  class=\"sysmain_navi\"  style=\"PADDING-LEFT: 14px\" >讨论组主题管理</td><td width=\"43%\"  class=\"topnavichar\"  style=\"PADDING-LEFT: 14px\" >";
        sc += "<div align=\"left\">位置导航:<a href=\"../main.aspx\" target=\"sys_main\" class=\"list_link\">首页</a><img alt=\"\" src=\"../../sysImages/folder/navidot.gif\" border=\"0\" /><a href=\"discussTopi_list.aspx?DisID=" + DidID + "\" class=\"list_link\">讨论组主题管理</a></div></td></tr></table>";
        sc += "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"1\" class=\"Navitable\"><tr><td style=\"padding-left:14px;\"><a href=\"discussTopi_list.aspx?DisID=" + DidID + "\" class=\"list_link\">讨论组主题</a>&nbsp;&nbsp;<a href=\"discussTopi_add.aspx?DisID=" + DidID + "\" class=\"menulist\">发表主题</a>&nbsp;&nbsp;<a href=\"discussTopi_ballot.aspx?DisID=" + DidID + "\" class=\"menulist\">发起投票</a>&nbsp;&nbsp;<a href=\"discussTopi_commentary.aspx?DtID=" + DidID + "&DisID=" + DisID + "\" class=\"list_link\">返回帖子</a></td></tr></table>";
        return sc;
    }

    protected void subset_Click(object sender, EventArgs e)
    {
        string title = this.title.Text;
        string Content = NetCMS.Common.Input.Htmls(this.contentBox.Value);
        Content += "<div style=\"width:100%;text-align:right;\"><font color=\"#999999\">此帖子已经被作者于" + DateTime.Now + "编辑过</font></div>";
        string dtID = this.DtIDs.Value;
        if (Content == "")
        {
            PageError("请填写内容", "");
        }
        else
        {
            rd.updateTopicDtID(dtID, title, Content);
            PageRight("修改帖子成功", "discussTopi_commentary.aspx?DtID=" + Request.QueryString["DtID"] + "&DisID=" + Request.QueryString["DisID"] + "");
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -