chakanjiluneirong.aspx.cs

来自「OA自动化办公系统,就是OA自动化办公系统」· CS 代码 · 共 59 行

CS
59
字号
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 System.Collections.Generic;
using COM.OA.Entity;

public partial class chakanjiluneirong : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //接收消息ID
        string idd=this.Request["id"];
        //判断是否为空
        if (idd != null && idd!="")
        {
            //格式化ID为int类型
            int id = Int32.Parse(idd);
            //设置WHERE语句
            string where = "m_id='{0}'";
            where = string.Format(where, id);
            //查询数据库
            IList<message> list = messageBLL.Select(where);
            //判断是否为空
            if (list.Count != 0)
            {
                //用实体接收显示
                message m = list[0];
                m.m_isreturn = 1;
                messageBLL.Update(m);
                this.txt_biaoti.Text = m.m_title;
                this.txt_neirong.Text = m.m_content;
                //把发送人ID转换成中文名字
                users uu = usersBLL.Select(m.m_u_id);
                this.txt_fabiaoren.Text = uu.u_username;

            }
            //如果为空,显示数据库中无此数据
            else
            {
                this.Response.Write(string.Format(GetRedirect.WINALERT, "数据库中无此数据"));
            }
        }
        //如果接收的发送消息ID为空,跳回发送记录页
        else
        {
            this.Response.Write(string.Format(GetRedirect.REDIRECT,"jieshouxinxi.aspx"));
        }

    }
}

⌨️ 快捷键说明

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