rizhineirong.aspx.cs
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using COM.OA.Entity;
  12. using COM.OA.BLL;
  13. using System.Collections.Generic;
  14. public partial class qs_rizhi_rizhineirong : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.         string biaoti=this.Request.QueryString["w_id"];
  19.         int wid = Int32.Parse(biaoti);
  20.       
  21.         worklog wl = worklogBLL.Select(wid);
  22.         string biaotiming = wl.w_title;
  23.         //点击+1后存入数据库
  24.         int dianji = wl.w_clicks + 1;
  25.         
  26.         //重新封装新对象
  27.         worklog wll = new worklog();
  28.         wll.w_id = wl.w_id;
  29.         wll.w_u_id = wl.w_u_id;
  30.         wll.w_title = wl.w_title;
  31.         wll.w_content = wl.w_content;
  32.         wll.w_clicks = dianji;
  33.         wll.w_state = wl.w_state;
  34.         wll.w_sendtime = wl.w_sendtime;
  35.         wll.w_readerid = wl.w_readerid;
  36.         wll.w_readtime = wl.w_readtime;
  37.         wll.w_readcontent = wl.w_readcontent;
  38.         //更新数据库
  39.         worklogBLL.Update(wll);
  40.         //取批阅人ID
  41.         int pid=wl.w_readerid;
  42.         if (pid <= 0)
  43.         {
  44.             this.lbPiYue.Text = "";
  45.         }
  46.         else
  47.         {
  48.             users us = usersBLL.Select(pid);
  49.             this.lbPiYue.Text = us.u_username;
  50.         }
  51.         
  52.         //给页面显示
  53.         this.lbBiaoTi.Text = biaotiming;
  54.         this.lbSendTime.Text = wl.w_sendtime.ToString();
  55.         this.lbDianJi.Text = dianji.ToString();
  56.         this.lbNeiRong.Text = wl.w_content;
  57.         //如果批阅内容为空不显示任何批阅信息
  58.         if (wl.w_readcontent.Equals(""))
  59.         {
  60.             this.lbPeiNeiRong.Text = "";
  61.             this.lbPeiTime.Text = "";
  62.         }
  63.         else 
  64.         {
  65.             this.lbPeiNeiRong.Text = wl.w_readcontent;
  66.             this.lbPeiTime.Text = wl.w_readtime.ToString();
  67.         }
  68.        
  69.     }
  70. }