sendwordindex.aspx
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:7k
源码类别:

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="sendwordindex.aspx.cs" Inherits="tzManager_sendwordindex" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>接收通知</title>
  6. <style type="text/css"> 
  7.     <!--
  8.     body {
  9.      margin-top: 2px;
  10.     }
  11.     -->
  12.     div.RoundedCorner{background: #5AAE18}
  13.     b.rtop, b.rbottom{display:block;background: #FFF} 
  14.     b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18} 
  15.     b.r1{margin: 0 4px}
  16.     b.r2{margin: 0 3px} 
  17.     b.r3{margin: 0 2px} 
  18.     b.rtop b.r4, {margin: 0 1px;height: 1px}
  19.     .style1 {
  20.     font-size: 13px;
  21.     color: #FFFFFF;
  22.         font-weight: bold;
  23.     } 
  24.     </style>
  25.     <script language="javascript" type="text/javascript">
  26.     </script>
  27.     
  28.     <link href="../css/link.css" rel="stylesheet" type="text/css" />
  29. </head>
  30. <body><form action="" runat="server" method="post" name="form1" onsubmit="return dis()"  id="Form1">
  31.     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  32.         <tr>
  33.           <td>
  34.             <table width="96%" border="0" cellspacing="0" cellpadding="0">
  35.              <tr>
  36.                   <td width="33%" valign="middle">&nbsp;</td>
  37.                 <td width="47%" valign="middle"><div align="right">
  38.                     <asp:TextBox ID="txtwhere" runat="server"></asp:TextBox>
  39.                     <asp:Button ID="btnselect" runat="server" OnClick="btnselect_Click" Text="查 询" />&nbsp;
  40.                   </div></td>
  41.               <td width="3%"><div align="center">
  42.                   &nbsp;<img alt="" src="../images/huiyan/fabutongzhi.gif" /></div></td>
  43.               <td width="7%"><span class="style4"><a href="../tzManager/addtz.aspx" class="style4">发布通知</a></span></td>
  44.               <td width="2%"><span class="style4">
  45.                   <img alt="" src="../images/huiyan/tongzhiguanli.gif" /></span></td>
  46.               <td width="7%"><div align="center" class="style4"><a href="../tzManager/guanlitongzhi.aspx">通知管理</a> </div></td>
  47.             </tr>
  48.           </table>
  49.       </td>
  50.     </tr>
  51.     </table>
  52.     <%
  53.                  //从Seeion中取出loginuser
  54.                  COM.OA.Entity.users user = Session["loginuser"] as COM.OA.Entity.users;
  55.                  //判断如果为空跳回到登陆页面
  56.                  if (user == null)
  57.                  {
  58.                      this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
  59.                      return;
  60.                  }    
  61.              %>
  62.              <% 
  63.                  System.Collections.Generic.IList<COM.OA.Entity.sendword> list = COM.OA.BLL.sendwordBLL.Select("sw_state=0", true, false);
  64.             //foreach循环输出到页面
  65.         %>
  66.             <% //查询数据库 并foreach循环输出到页面 显示部门
  67.                  System.Collections.Generic.IList<COM.OA.Entity.department> departmentlist = COM.OA.BLL.departmentBLL.Select();%>
  68.              
  69.           <div class="RoundedCorner" style="text-align: center">
  70.     <b class="rtop"><b class="r1"></b><b class="r2"></b>
  71.                 <b class="r3"></b><b class="r4"></b></b> <span class="style1">接 收 通 知</span></div>   
  72.          <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#5aaE18"> 
  73.              <tr>
  74.              <td height="24" colspan="8" bgcolor="#FFFFFF" >             
  75.              <%foreach (COM.OA.Entity.department d in departmentlist) %><% { %>
  76.              
  77.             &nbsp;<a href="tzdept.aspx?dept_id=<%=d.dept_id %>"><%= d.dept_department  %></a>
  78.           <% } %>
  79.           (共<font color="#5aaE18"><strong><%=list.Count.ToString()%></strong></font>条通知)
  80.              </td>
  81.              </tr>          
  82.         <tr bgcolor="#FFFFFF">
  83.           <td width="38%" height="21"><div align="left" style="text-align: center"><strong>&nbsp;标 题 </strong></div></td>
  84.           <td width="6%"><div align="center"><strong><span class="style13">发布人</span></strong></div></td>
  85.           <td width="7%"><div align="center"><strong>部 门</strong></div></td>
  86.           <td width="15%"><div align="center"><strong>时 间</strong></div></td>
  87.           <td width="8%"><div align="center"><strong>浏览</strong></div></td>          
  88.         </tr>
  89.                 
  90.         <% foreach(COM.OA.Entity.sendword sw in list) %><% { %>
  91.         <tr bgcolor="#FFFFFF" onmouseover = "this.style.backgroundColor = '#EEEEEE'" onmouseout = "this.style.backgroundColor = ''">
  92.           <td style="text-align: left">&nbsp; &nbsp; <img alt="" src="../images/huiyan/biaoti.gif" />&nbsp;<a href="tongzhineirong.aspx?sw_id=<%=sw.sw_id %>">
  93.           <%=sw.sw_title  %></a>&nbsp; &nbsp;
  94.           <% int rt = Int32.Parse(sw.sw_releasetime.ToString("yy") + sw.sw_releasetime.ToString("MM") + sw.sw_releasetime.ToString("dd"));//发帖时间
  95.              int nt = Int32.Parse(DateTime.Now.ToString("yy") + DateTime.Now.ToString("MM") + DateTime.Now.ToString("dd"));//现在时间
  96.              if (nt - rt <= 1)
  97.              {
  98.                 %> <img src="../images/wximg/new-028.gif" /> <%
  99.              }
  100.           %>
  101.           </td>
  102.           <td><div align="center">
  103.           <% System.Collections.Generic.IList<COM.OA.Entity.employee> el = COM.OA.BLL.employeeBLL.Select("em_id="+sw.users.u_em_id);
  104.                                                              COM.OA.Entity.employee e = el[0];
  105.                %><%=e.em_name %><%
  106.                 %></div></td>
  107.           <td><div align="center"><%=sw.department.dept_department %></div></td>
  108.           <td><div align="center">
  109.             <div align="center">
  110.               <div align="center">
  111.                 <%=sw.sw_releasetime %>
  112.                 
  113.               </div>
  114.             </div>
  115.           </div></td>
  116.           <td><div align="center"><%=sw.sw_reads %></div></td>
  117.           
  118.         </tr>
  119.         <% } %>
  120.       </table>
  121.       <br/>      <br/>
  122.         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  123.         <tr>
  124.         <td></td>
  125.           <td  align="center">
  126.           <% if (list.Count > 0)
  127.              { %>
  128.           记录 1 到 <%=list.Count.ToString() %> (总共 <%=list.Count.ToString() %>个通知)
  129.           <% } else{ %>
  130.           暂无通知
  131.           <%}%>
  132.            </td>          
  133.           <td></td>
  134.         </tr>
  135.         <tr>
  136.         <td></td>        
  137.         <td align="center">
  138.             <img src="../images/huiyan/up.gif" /><a href="javascript:history.go(-1)">返 回</a>
  139.         </td>
  140.         <td></td>
  141.         </tr>
  142.         </table>
  143.         </form>
  144. </body>
  145. </html>