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

📄 updateshenpi.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.Entity;
using COM.OA.BLL;
using System.Collections.Generic;

public partial class lb_shenpi_updateshenpi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int id =Int32.Parse( this.Request.Params["id"]);
        examine ex = examineBLL.Select(id);
        users u = usersBLL.Select(ex.ex_u_id,true,false);
        this.txbsy.Text = ex.ex_applycontent;
        this.FreeTextBox1.Text = ex.ex_define;
        this.txbbz.Text = ex.ex_remark;
        this.txbname.Text = u.employee.em_name;
    }
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        //验证
        this.check();
        //申请人
        string name = this.txbname.Text;
        string where = "u_em_id =(select em_id from employee where em_name ='" + name + "')";

        IList<users> elist = usersBLL.Select(where);
        users u = elist[0];

        examine ex = new examine();
        //事由
        ex.ex_applycontent = this.txbsy.Text;
        //备注
        ex.ex_remark = this.txbbz.Text;
        //说明
        ex.ex_define = this.FreeTextBox1.Text;
        //申请时间
        ex.ex_applytime = DateTime.Now.ToLocalTime();
        ex.ex_examinetiem = DateTime.Now.ToLocalTime();
        //状态
        ex.ex_state = 0;
        //申请人ID
        ex.ex_u_id = u.u_id;
        //部门
        ex.ex_dept_id = u.u_dept_id;
        //把审批的实体放入会话
        Session.Add("examines", ex);
        this.Response.Redirect("updatepost.aspx");

    }
    protected void btnReset_Click(object sender, EventArgs e)
    {
        this.txbsy.Text = "";
        this.txbbz.Text = "";
        this.FreeTextBox1.Text = "";

    }
    private void check()
    {
        if (this.txbsy.Text == "")
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "请填写事由"));
            this.txbsy.Focus();
            return;
        }
        if (this.FreeTextBox1.Text == "")
        {
            this.Response.Write(string.Format(GetRedirect.WINALERT, "请填写审批说明"));
            this.FreeTextBox1.Focus = true;
            return;
        }
    }
}

⌨️ 快捷键说明

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