⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peiyueadd.aspx.cs

📁 OA自动化办公系统,就是OA自动化办公系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using COM.OA.Entity;
using System.Collections.Generic;

public partial class qs_rizhi_peiyueadd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            string id = this.Request.QueryString["w_id"];
            int wid = Int32.Parse(id);
           worklog wl = worklogBLL.Select(wid);
            
            int uid = wl.w_u_id;


            users us = usersBLL.Select(uid);
            
             
            this.txtUname.Text = us.u_username;
            this.txtBiaoTi.Text = wl.w_title;
            this.txtNeiRong.Text = wl.w_content;

            //取当前登陆人名进入页面就副上批阅人
            users loginuser = Session["loginuser"] as users;
            int uidd = loginuser.u_id;
            string where5 = "op_u_id='{0}'";
            where5 = string.Format(where5, uidd);
            IList<operate> listop = operateBLL.Select(where5);
            operate op = listop[0];
            int quanxian = op.op_pop_id;
            
            if (loginuser == null)
            {
                this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
                return;
            }
            else if (quanxian < 1)
            {
                this.Response.Write(string.Format(GetRedirect.WINALERT, "您不是经理没有批阅条件"));
                this.Response.Write(string.Format(GetRedirect.REDIRECT, "rizhipiyue.aspx"));
            }else
            {
                string LoginName = loginuser.u_username;


                this.txtPeiId.Text = LoginName;
            }
            
          

          
           
        }
       
       
        
      


    }
    protected void btAdd_Click(object sender, EventArgs e)
    {
        //提交

        string pname=this.txtPeiId.Text;
        string where = "u_username='{0}'";
        //根据姓名查部门ID
        where = string.Format(where, pname);
        IList<users> list = usersBLL.Select(where);
        users us = list[0];
        int pid = us.u_id;


        string peineirong = this.ftbPeiNeiRong.Text;
        DateTime ptime = DateTime.Now;
        string wwid=this.Request.QueryString["w_id"];
        int w_id = Int32.Parse(wwid);
          worklog wl = worklogBLL.Select(w_id);
       


        //重新封装
        worklog wll=new worklog();

        wll.w_id = wl.w_id;
        wll.w_title = wl.w_title;
        wll.w_clicks = wl.w_clicks;
        wll.w_content = wl.w_content;
        wll.w_sendtime = wl.w_sendtime;
        //讨论后再定
        wll.w_state=wl.w_state;
        wll.w_u_id = wl.w_u_id ;
        wll.w_readerid = pid;
        wll.w_readcontent = peineirong;
        wll.w_readtime = ptime;

        worklogBLL.Update(wll);
        this.Response.Redirect("rizhipiyue.aspx");
    }
   
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -