Asp.net源码专业站
首页->博客空间->替某公司写的一个小论坛(供新人参考)>>NewTopic.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:替某公司写的一个小论坛(供新人参考)
当前文件:文件类型 lingdaBBS/NewTopic.aspx.cs[1K,2009-6-12 11:47:01]打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using DataLogicLayer; 12 13public partial class NewTitle : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 18 } 19 20 21 protected void btnSubmit_Click(object sender, EventArgs e) 22 { 23 TopicClass topic = new TopicClass(); 24 topic.SectionID = Convert.ToInt32(Session["SectionID"].ToString()); 25 topic.UserID = Convert.ToInt32(Session["UserID"]); 26 topic.Click_Count = 1; 27 topic.Contents = txtContent.Text; 28 topic.CreateTime = System.DateTime.Now; 29 topic.ReplyCount = 0; 30 topic.Title = txtTitle.Text.Trim(); 31 topic.TitleType = ddlTitleType.SelectedValue; 32 topic.LastReplyTime = System.DateTime.Now; 33 if(topic.InsertTopic(topic)) 34 { 35 LoginUser user = new LoginUser(); 36 //更新用户表 37 user.UserID = Convert.ToInt32(Session["UserID"]); 38 user.UserTitleCount = user.UserTitleCount + 1; 39 user.UpdateTitleCount(user); 40 41 //更新版块表 42 SectionClass section = new SectionClass(); 43 section.SectionID=Convert.ToInt32(Session["SectionID"]); 44 section.TitleCount++; 45 section.TopicCount++; 46 section.DayTitle++; 47 section.UpdateSection(section); 48 Response.Redirect("DisplayTitle.aspx?SectionID="+Session["SectionID"]); 49 } 50 else 51 { 52 Response.Redirect("NewTopic.aspx"); 53 } 54 } 55} 56
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:替某公司写的一个小论坛(供新人参考)
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146