gw_selectlike.aspx.cs

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

CS
45
字号
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 gw_gw_selectlike : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string cmd = this.Request.QueryString["cmd"];

        string sql = "doc_title like '%{0}%'";
        sql = string.Format(sql, cmd);
        IList<document> dlist = documentBLL.Select(sql,true,false);
        this.Response.Write("<br/><br/>");
        this.Response.Write("<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width='5' height='21'><img src='../images/sj/leftlin1.gif' width='6' height='21'></td><td width='936' bgcolor='#5AAE18'><div align='center'><div align='center' class='style42'><span class='style3 style2 style1 style16 style41'><span class='style3 style1 style16 style41'><strong>公 文 内 容</strong></span></div><span class='style1'></span></div></td><td width='6' height='21'><img src='../images/sj/rightlin1.gif' width='6' height='21'></td></tr></table>");
        this.Response.Write("<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#5AAE18'>");
        if (dlist.Count != 0)
        {

            this.Response.Write("<tr bgcolor='#FFFFFF'><td><strong>标题</strong></td><td><strong>接收对象</strong></td><td><strong>点击次数</strong></td><td><strong>发送人</strong></td><td><strong>时间</strong></td></tr>");
            foreach (document d in dlist)
            {
                this.Response.Write("<tr bgcolor='#FFFFFF'><td><a href='gw_documentinfo.aspx?docid=" + d.doc_id + "'>" + d.doc_title + "</a></td><td>" + d.department.dept_department + "</td><td>" + d.doc_clicks + "次</td><td>" + d.users.u_username + "</td><td>" + d.doc_releasetime + "</td>");
            }
            
        }
        else
        {
            this.Response.Write("<tr><td colspan='4' align='left'><span class='style1'>对不起,没有你要查找的数据!!</span></td></tr>");
        }
        this.Response.Write("</table>");
        
    }
}

⌨️ 快捷键说明

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