Display.aspx.cs
资源名称:精品OA.rar [点击查看]
上传用户:xgw_05
上传日期:2009-12-11
资源大小:20208k
文件大小:12k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Data.SqlClient;
- 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 UDS.Components;
- namespace UDS.SubModule.UnitiveDocument.BBS
- {
- /// <summary>
- /// Display 的摘要说明。
- /// </summary>
- public class Display : System.Web.UI.Page
- {
- private int itemid;//贴子ID
- private int boardid;//板块id
- protected bool isboardmaster;//是本版斑竹
- protected string username;//用户名
- protected System.Web.UI.WebControls.Literal sendtime;
- protected System.Web.UI.WebControls.Literal browsetime;
- protected System.Web.UI.WebControls.Literal sendman;
- protected System.Web.UI.WebControls.Literal replaytimes;
- protected System.Web.UI.WebControls.Literal replaytime;
- protected System.Web.UI.WebControls.Literal replayer;
- protected System.Web.UI.WebControls.Repeater replaylist;
- protected System.Web.UI.HtmlControls.HtmlInputButton cmdOK;
- protected System.Web.UI.HtmlControls.HtmlTextArea Content;
- protected System.Web.UI.HtmlControls.HtmlTableCell itemcontent;
- protected System.Web.UI.WebControls.Label lblTitle;
- protected System.Web.UI.WebControls.Panel pnlReplayOp;
- protected System.Web.UI.HtmlControls.HtmlInputFile hif;
- protected System.Web.UI.WebControls.DropDownList ddl_FileType;
- protected System.Web.UI.WebControls.Button btn_UpAtt;
- protected System.Web.UI.WebControls.CheckBox cbx_DeskTop;
- protected System.Web.UI.WebControls.CheckBox cbx_sysBulletin;
- protected System.Web.UI.WebControls.CheckBox cbx_boardBulletin;
- protected string title = "";
- private void Page_Load(object sender, System.EventArgs e)
- {
- if(!Page.IsPostBack)
- {
- username = Request.Cookies["Username"].Value;
- itemid = (Request.QueryString["ItemID"]==null)?0:Int32.Parse(Request.QueryString["ItemID"].ToString());
- boardid = (Request.QueryString["BoardID"]==null)?0:Int32.Parse(Request.QueryString["BoardID"].ToString());
- ViewState["username"] = username;
- ViewState["itemid"] = itemid;
- ViewState["boardid"] = boardid;
- ViewState["isboardmaster"] = isboardmaster;
- BBSClass bbsclass = new BBSClass();
- BBSForumItem bbsforumitem = new BBSForumItem();
- bbsforumitem.ItemID = itemid;
- SqlDataReader dr = null;
- dr = bbsclass.ReadBBSForumItem(bbsforumitem);
- //判断是否是斑竹
- isboardmaster = bbsclass.IsBoardMaster(boardid,username);
- if(isboardmaster)
- cbx_boardBulletin.Visible = true;
- else
- cbx_boardBulletin.Visible = false;
- if(Request.Cookies["UDSBBSAdmin"]!=null)
- {
- if(Request.Cookies["UDSBBSAdmin"].Value=="1")
- cbx_sysBulletin.Visible = true;
- else
- cbx_sysBulletin.Visible = false;
- }
- else
- {
- cbx_sysBulletin.Visible = false;
- cbx_sysBulletin.Visible = false;
- }
- while(dr.Read())
- {
- this.title = lblTitle.Text = dr["title"].ToString();
- sendtime.Text = dr["send_time"].ToString();
- browsetime.Text = dr["hit_times"].ToString();
- replaytimes.Text = dr["replay_times"].ToString();
- sendman.Text = dr["sender"].ToString();
- //判断是否是系统公告,如果是只有管理员能够操作
- if(Boolean.Parse(dr["sysbulletin"].ToString()))
- {
- if(Request.Cookies["UDSBBSAdmin"]!=null)
- {
- if(Request.Cookies["UDSBBSAdmin"].Value=="1")
- {
- itemcontent.InnerHtml += "<b>操