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

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" autoEventWireup="true" CodeFile="guanlitongzhi.aspx.cs" Inherits="tzManager_guanlitongzhi" %>
  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 id="Head1" 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.     <style type="text/css">
  30. <!--
  31. body {
  32. margin-top: 2px;
  33. }
  34. .style2 {color: #FF0000}
  35. .style3 {color: #999999}
  36. -->
  37. </style>
  38. </head>
  39. <body>
  40. <form action="" runat="server" method="post" name="form1" onsubmit="return dis()"  id="Form2">
  41.     <table width="100%" border="0" cellspacing="0" cellpadding="0">
  42.         <tr>
  43.           <td>
  44.             <table width="96%" border="0" cellspacing="0" cellpadding="0">
  45.              <tr>
  46.                   <td width="33%" valign="middle">&nbsp;</td>
  47.                 <td width="47%" valign="middle"><div align="right">
  48.                     &nbsp;<asp:TextBox ID="txtwhere" runat="server"></asp:TextBox>
  49.                     <asp:Button ID="btnselect" runat="server" OnClick="btnselect_Click" Text="查 询" />
  50.                   </div></td>
  51.               <td width="3%"><div align="center">
  52.                   &nbsp;<img alt="" src="../images/huiyan/fabutongzhi.gif" /></div></td>
  53.               <td width="7%"><span class="style4"><a href="../tzManager/addtz.aspx" class="style4">发布通知</a></span></td>
  54.               <td width="2%"><span class="style4">
  55.                   <img alt="" src="../images/huiyan/jieshoutongzhi.gif" /></span></td>
  56.               <td width="7%"><div align="center" class="style4"><a href="../tzManager/sendwordindex.aspx">通知列表</a> </div></td>
  57.             </tr>
  58.           </table>
  59.       </td>
  60.     </tr>
  61.     </table>      
  62.        
  63.         <div class="RoundedCorner"> 
  64.       <div align="center"><b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <span class="style1">通 知 管 理</span></div>
  65.     </div>
  66.     <div align="center">
  67.       <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#5aaE18">
  68.         
  69.         <tr bgcolor="#FFFFFF">
  70.           <td width="38%" height="21"><div align="left" style="text-align: center"><strong>&nbsp;标 题 </strong></div></td>
  71.           <td width="6%"><div align="center"><strong><span class="style13">发布人</span></strong></div></td>
  72.           <td width="7%"><div align="center"><strong>部 门</strong></div></td>
  73.           <td width="15%"><div align="center"><strong>时 间</strong></div></td>
  74.           <td width="8%"><div align="center"><strong>浏览</strong></div></td>
  75.           <td width="5%"><div align="center" class="style6"><strong>状 态</strong></div></td>
  76.           <td width="5%"><div align="center" class="style7"><strong>开 关</strong></div></td>
  77.           <td width="8%"><div align="center"><strong>操 作</strong></div></td>
  78.         </tr>
  79.         <% 
  80.             //从Seeion中取出loginuser
  81.             COM.OA.Entity.users user = Session["loginuser"] as COM.OA.Entity.users; 
  82.             //判断如果为空跳回到登陆页面
  83.             if (user == null)
  84.             {
  85.                 this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
  86.                 return;
  87.             }
  88.             System.Collections.Generic.IList<COM.OA.Entity.sendword> list = null;
  89.             string name = user.u_username;
  90.             if (name == "admin")
  91.             {
  92.                 list = COM.OA.BLL.sendwordBLL.Select(true, false);
  93.             }
  94.             else
  95.             {
  96.                 //取出uid
  97.                 int u_id = Int32.Parse(user.u_id.ToString());
  98.                 //查询数据库
  99.                 list = COM.OA.BLL.sendwordBLL.Select("sw_u_id = " + u_id, true, false);
  100.             }
  101.             //foreach循环输出到页面
  102.         %>        
  103.         <% foreach(COM.OA.Entity.sendword sw in list) %><% { %>
  104.         <tr bgcolor="#FFFFFF" onmouseover ="this.style.backgroundColor='#EEEEEE'"  onmouseout ="this.style.backgroundColor=''">
  105.           <td style="text-align: left">&nbsp; &nbsp; <img alt="" src="../images/huiyan/biaoti.gif" />&nbsp;<a href="tongzhineirong.aspx?sw_id=<%=sw.sw_id %>">
  106.           <%=sw.sw_title  %>
  107.           </a>&nbsp;<span class="style3"><%=sw.sw_releasetime %></span></td>
  108.           <td><div align="center">
  109.           <% System.Collections.Generic.IList<COM.OA.Entity.employee> el = COM.OA.BLL.employeeBLL.Select("em_id="+sw.users.u_em_id);
  110.                                                              COM.OA.Entity.employee e = el[0];
  111.                %><%=e.em_name %><%
  112.                 %></div></td>
  113.           <td><div align="center"><%=sw.department.dept_department %></div></td>
  114.           <td><div align="center">
  115.             <div align="center">
  116.               <div align="center">
  117.                 <%=sw.sw_releasetime %>
  118.                 
  119.               </div>
  120.             </div>
  121.           </div></td>
  122.           <td><div align="center"><%=sw.sw_reads %></div></td>
  123.           <td><div align="center">
  124.             <%
  125.                 if (sw.sw_state == 1) {                
  126.                     %><img alt="" src="../images/huiyan/close.gif" /><%
  127.                 }else{
  128.                     %><img alt="" src="../images/huiyan/open.gif" /><%
  129.                 }
  130.             %>            
  131.           </div></td>
  132.           <td><div align="center">
  133.           <%
  134.               if (sw.sw_state == 0)
  135.               {                
  136.                 %><a href="close.aspx?sw_id=<%=sw.sw_id %>">关闭</a> <%
  137.               }
  138.               else
  139.               {
  140.                   %><a href="open.aspx?sw_id=<%=sw.sw_id %>">开通</a><%
  141.               }            
  142.            %>
  143.           </div></td>
  144.           <td><div align="center"><a href="updaz.aspx?sw_id=<%=sw.sw_id %>">修改</a> <a href="deltz.aspx?sw_id=<%=sw.sw_id %>" onclick="return confirm('您确定要删除 公司OA升级通知 吗?该过程将不可恢复。')">删除</a></div> 
  145.           </td>
  146.         </tr>
  147.         <% } %>
  148.       </table>
  149.       <br/>      
  150.     </div>
  151.     <table width="100%">
  152.             <tr>
  153.         <td></td>
  154.           <td  align="center">
  155.           
  156.           <% if (list.Count != 0)
  157.              { %>
  158.           记录 1 到 <%=list.Count.ToString()%> (总共<%=list.Count.ToString()%> 个通知) 
  159.           <% }else { %>
  160.           暂无通知
  161.           <%}%>
  162.           </td>          
  163.           <td></td>
  164.         </tr>
  165.     <tr>
  166.         <td>
  167.         </td>
  168.         <td style="text-align: center" >
  169.             <img src="../images/huiyan/up.gif" /><a href="javascript:history.go(-1)">返 回</a>
  170.         </td>
  171.         <td>
  172.         </td>
  173.     </tr>
  174.     </table>
  175.     <table border="0" width="30%" align="center">
  176.       <tr>
  177.         <td width="23%" align="center">
  178.         </td>
  179.         <td width="31%" align="center">
  180.         </td>
  181.         <td width="23%" align="center">
  182.         </td>
  183.         <td width="23%" align="center">
  184.         </td>
  185.       </tr>
  186.     </table>
  187.     </form>
  188. </body>
  189. </html>