Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         int id = Request.QueryString["ID"] == null ? 0 : int.Parse(Request.QueryString["ID"]);
         PN_HasReadStaffBLL hasReadStaffbll = new PN_HasReadStaffBLL();
         PN_CommentBLL      commentbll      = new PN_CommentBLL();
         lab_hasRead.Text = hasReadStaffbll.GetReadCountByNotice(id).ToString();
         lab_comment.Text = commentbll.GetCommentCountByNotice(id).ToString();
     }
 }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {

            int id = Request.QueryString["ID"] == null ? 0 : int.Parse(Request.QueryString["ID"]);
            PN_HasReadStaffBLL hasReadStaffbll = new PN_HasReadStaffBLL();
            PN_CommentBLL commentbll = new PN_CommentBLL();
            lab_hasRead.Text = hasReadStaffbll.GetReadCountByNotice(id).ToString();
            lab_comment.Text = commentbll.GetCommentCountByNotice(id).ToString();

        }
    }
Пример #3
0
    private void BindGrid()
    {
        int    approveflag;
        string CanComment;

        #region 显示公告主题内容
        PN_NoticeBLL noticebll = new PN_NoticeBLL(Convert.ToInt32(ViewState["ID"]));
        lbl_Topic.Text   = noticebll.Model.Topic.ToString();
        lbl_content.Text = noticebll.Model.Content.ToString();

        PN_HasReadStaffBLL hasReadStaffbll = new PN_HasReadStaffBLL();
        PN_CommentBLL      commentbll      = new PN_CommentBLL();
        lab_hasRead.Text = hasReadStaffbll.GetReadCountByNotice(Convert.ToInt32(ViewState["ID"])).ToString();
        lab_comment.Text = commentbll.GetCommentCountByNotice(Convert.ToInt32(ViewState["ID"])).ToString();

        insertstaff = int.Parse(noticebll.Model.InsertStaff.ToString());
        lbl_InsertStaffName.Text = new Org_StaffBLL(insertstaff).Model.RealName;
        lbl_InsertTime.Text      = noticebll.Model.InsertTime.ToString();
        approveflag          = noticebll.Model.ApproveFlag;   //是否可以添加评论
        CanComment           = noticebll.Model.CanComment;    //审核标志
        ViewState["Catalog"] = noticebll.Model["Catalog"];
        #endregion

        #region 展示附件
        UploadFile1.RelateID = Convert.ToInt32(ViewState["ID"]);
        UploadFile1.BindGrid();
        #endregion

        #region 初始化时折叠评论内容和评论板
        //UpdatePanel1.Visible = false;
        #endregion

        #region 判断此公告是否可以评论
        if (CanComment == "N")
        {
            btn_LookComment.Visible = false;
        }
        #endregion
    }
Пример #4
0
    private void BindGrid()
    {
        int approveflag;
        string CanComment;

        #region 显示公告主题内容
        PN_NoticeBLL noticebll = new PN_NoticeBLL(Convert.ToInt32(ViewState["ID"]));
        lbl_Topic.Text = noticebll.Model.Topic.ToString();
        lbl_content.Text = noticebll.Model.Content.ToString();

        PN_HasReadStaffBLL hasReadStaffbll = new PN_HasReadStaffBLL();
        PN_CommentBLL commentbll = new PN_CommentBLL();
        lab_hasRead.Text = hasReadStaffbll.GetReadCountByNotice(Convert.ToInt32(ViewState["ID"])).ToString();
        lab_comment.Text = commentbll.GetCommentCountByNotice(Convert.ToInt32(ViewState["ID"])).ToString();

        insertstaff = int.Parse(noticebll.Model.InsertStaff.ToString());
        lbl_InsertStaffName.Text = new Org_StaffBLL(insertstaff).Model.RealName;
        lbl_InsertTime.Text = noticebll.Model.InsertTime.ToString();
        approveflag = noticebll.Model.ApproveFlag;            //是否可以添加评论
        CanComment = noticebll.Model.CanComment;              //审核标志
        ViewState["Catalog"] = noticebll.Model["Catalog"];
        #endregion

        #region 展示附件
        UploadFile1.RelateID = Convert.ToInt32(ViewState["ID"]);
        UploadFile1.BindGrid();
        #endregion

        #region 初始化时折叠评论内容和评论板
        //UpdatePanel1.Visible = false;
        #endregion

        #region 判断此公告是否可以评论
        if (CanComment == "N")
        {
            btn_LookComment.Visible = false;
        }
        #endregion
    }