newtopic.aspx.cs
来自「基于Asp.net、MS sql sever 2000、C# 论坛系统源码」· CS 代码 · 共 68 行
CS
68 行
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Stella.Model;
using System.Security.Permissions;
namespace Stella.Web.Pages
{
/// <summary>
/// newTopic 的摘要说明。
/// </summary>
[PrincipalPermission(SecurityAction.Demand,Authenticated=true)]
public class newTopic : Container
{
protected System.Web.UI.WebControls.Button go;
protected Stella.Web.Controls.NewTopic newArt;
private void Page_Load(object sender, System.EventArgs e)
{
Stella.Utility.DebugHelper.CheckCondition(Request["tid"]!=null,"没有版块编号tid传入newTopic.aspx页");
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.go.Click += new System.EventHandler(this.go_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void go_Click(object sender, System.EventArgs e)
{
int tid=int.Parse(Request["tid"]);
TopArt art=this.newArt.TopValue;
art.ThemeId=tid;
this.artLogic.Create(art);
this.themeCounter[tid].ArtSum++;
this.themeCounter[tid].TopicSum++;
this.forumCounter.TopicSum++;
this.forumCounter.ArtSum++;
Response.Redirect(string.Format("theme.aspx?tid={0}",tid));
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?