jiluxiu.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 System.Collections.Generic;
  13. using COM.OA.BLL;
  14. public partial class qs_rizhi_Default : System.Web.UI.Page
  15. {
  16.     protected void Page_Load(object sender, EventArgs e)
  17.     {
  18.         if (!IsPostBack) 
  19.         {
  20.             string w_id = this.Request.QueryString["w_id"];
  21.             int wid = Int32.Parse(w_id);
  22.             //根据ID查出信息
  23.             worklog wl = worklogBLL.Select(wid);
  24.             int u_id = wl.w_u_id;
  25.             users us = usersBLL.Select(u_id);
  26.             this.txtUname.Text = us.u_username;
  27.             this.txtBiaoTi.Text = wl.w_title;
  28.             this.ftbNeiRong.Text = wl.w_content;
  29.         }
  30.        
  31.         
  32.     }
  33.     protected void btXiuGai_Click(object sender, EventArgs e)
  34.     {
  35.         DateTime aa = DateTime.Now;
  36.         string uname =this.txtUname.Text;
  37.         //取姓名ID
  38.         string where1 = "u_username='{0}'";
  39.         where1 = string.Format(where1, uname);
  40.         IList<users> listuname = usersBLL.Select(where1);
  41.         users user = listuname[0];
  42.         int userId = user.u_id;
  43.         string biaoti = this.txtBiaoTi.Text;
  44.         string neirong = this.ftbNeiRong.Text;
  45.      
  46.           string id=this.Request.QueryString["w_id"]; 
  47.             int workid=Int32.Parse(id);
  48.          
  49.            worklog wll = worklogBLL.Select(workid);
  50.            
  51.             wll.w_u_id = userId;
  52.             wll.w_title = biaoti;
  53.             wll.w_content = neirong;
  54.             wll.w_sendtime = aa;
  55.             wll.w_clicks = 0;
  56.             wll.w_state = 0;
  57.             wll.w_readcontent = "";
  58.             wll.w_readerid = 0;
  59.             wll.w_readtime = DateTime.Parse("2008-01-01");
  60.             worklogBLL.Update(wll);
  61.             this.Response.Write(string.Format(GetRedirect.WINALERT, "修改成功"));
  62.             this.Response.Write(string.Format(GetRedirect.REDIRECT, "rizhijilu.aspx"));
  63.             
  64.        
  65.         
  66.        
  67.         
  68.        
  69.     }
  70.   
  71. }