📄 discusssubsclass.aspx.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_discussubsclass : NetCMS.Web.UI.UserPage
{
NetCMS.Content.Discuss rd = new NetCMS.Content.Discuss();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
sysClass.InnerHtml = showsysClass();
string _ClassID = Request.QueryString["ClassID"];
string _action = Request.QueryString["Action"];
if (_ClassID != "" && _ClassID != null) { classLists.InnerHtml = getsClasslist(_ClassID.ToString()); }
if (_action != "" && _action != null)
{
if (_action.ToString() == "del")
{
rd.getsClassDel(Request.QueryString["ID"],0);
PageRight("删除成功", "discusssubsclass.aspx");
}
}
}
}
protected string getsClasslist(string ClassID)
{
string _str = "";
DataTable dt = rd.sel_discussInfo(ClassID,1);
if (dt != null)
{
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
_str += "<div style=\"width:98%;padding-top:5px;height:20px;position:relative;width:50%;border-top-width:1px;border-right-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-top-style: dashed; border-right-style: none;border-bottom-style: none;border-left-style: none;border-top-color: #CCCCCC;\"><a href=\"discusssubsclass.aspx?ID=" + dt.Rows[i]["DcID"].ToString() + "&Action=del\" onclick=\"{if(confirm('确定要删除吗?')){return true;}return false;}\"><img src=\"../../sysImages/folder/dels.gif\" border=\"0\" title=\"删除\"></a> " + dt.Rows[i]["Cname"].ToString() + "</div>\r";
}
}
dt.Clear(); dt.Dispose();
}
return _str;
}
protected string showsysClass()
{
string _str = "";
DataTable dt = rd.sel_disTable(2);
if (dt != null)
{
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
_str += "<a class=\"list_link\" href=\"discusssubsclass.aspx?ClassID=" + dt.Rows[i]["DcID"].ToString() + "\">" + dt.Rows[i]["Cname"].ToString() + "</a> ";
}
}
dt.Clear(); dt.Dispose();
}
return _str;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -