open.aspx.cs
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:1k
源码类别:
OA系统
开发平台:
C#
- 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;
- public partial class tzManager_open : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- //从Session中取得信息
- users user = Session["loginuser"] as users;
- //判断信息 如果为空跳回登陆页面
- if (user == null)
- {
- this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
- return;
- }
- //从Request中取出sw_id
- int sw_id = Int32.Parse(this.Request["sw_id"]);
- //查询数据库并放入实体类
- sendword sw = sendwordBLL.Select(sw_id, true, false);
- //取出“状态信息”
- int state = sw.sw_state;
- //判断并修改,再跳转
- if (state == 1)
- {
- state = 0;
- sw.sw_state = state;
- sendwordBLL.Update(sw);
- this.Response.Write(string.Format(GetRedirect.REDIRECT, "guanlitongzhi.aspx"));
- }
- }
- }