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

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="fasongjilu.aspx.cs" Inherits="fasongjilu" %>
  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. div.RoundedCorner{background: #5AAE18} 
  8. b.rtop, b.rbottom{display:block;background: #FFF} 
  9. b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18} 
  10. b.r1{margin: 0 4px} 
  11. b.r2{margin: 0 3px} 
  12. b.r3{margin: 0 2px} 
  13. b.rtop b.r4, {margin: 0 1px;height: 1px}
  14. .style1 {
  15. font-size: 13px;
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. </style>
  19. <style type="text/css">
  20. <!--
  21. .style2 {font-size: 12px}
  22. -->
  23. </style>
  24. <script type="text/javascript">
  25. function CheckAll(form){
  26. for (var i=0;i<form.elements.length;i++){
  27. var e = form.elements[i];
  28. if (e.name != 'chkAll')
  29. e.checked = form.chkAll.checked;
  30. }
  31. }
  32. </script>
  33. <script type="text/javascript" language="javascript">
  34.   function check()//表单判断
  35.   {
  36.    var str="";
  37.    var j=0;
  38.    var el=document.form1.getElementsByTagName("input")
  39.    for(i=0;i<el.length;i++){
  40.     if(el[i].type=="checkbox"){
  41.      if((el[i].checked)&&(el[i].name.indexOf("deletecheck")!='-1')){
  42.       j++;
  43.      }
  44.     }
  45.    }
  46.    if(j > 100 || j<1)
  47.    {
  48.     alert("最少必须选择一项,最多不能超过100项!rt你现在选择了"+j+"项");
  49.     return false;
  50.    }
  51.    
  52.      if(!confirm('您确定要删除吗?'))
  53.      {
  54.         return false
  55.     } 
  56.     else 
  57.     document.form1.submit();
  58.     }
  59.   </script>
  60.   
  61.   
  62. <style type="text/css">
  63. <!--
  64. body {
  65. margin-top: 2px;
  66. }
  67. -->
  68. </style>
  69. <link href="../css/textarea.css" rel="stylesheet" type="text/css" />
  70. </head>
  71. <body style="text-align: center">
  72.     <form name="form1" id="form1" onsubmit="return check();" action="deletefasongcheck.aspx">
  73.         <table border="0" bgcolor="#5AAE18">
  74.             <tr bgcolor='#FFFFFF'>
  75.             <td colspan="6" align="center">
  76.                 <div class="RoundedCorner"> 
  77. <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></td>
  78.                 
  79.             </tr>
  80.             <tr bgcolor='#FFFFFF'>
  81.                 <td style="width: 59px; height: 1px;" align="center">
  82.                      <input  type="submit" name="Submit"  value="取消发送" /></td>
  83.                 <td style="width: 938px; height: 1px" align="center">
  84.                     标题</td>
  85.                 <td style="width: 103px; height: 1px;" align="center">
  86.                     读否</td>
  87.                  <td style="width: 79px; height: 1px;" align="center">
  88.                      转发</td>
  89.                  <td style="width: 101px; height: 1px;" align="center">
  90.                      接收人</td>
  91.                  <td style="width: 270px; height: 1px;" align="center">
  92.                      时间</td>
  93.             </tr>
  94.             <%  
  95.                     //取登陆人信息 
  96.                     COM.OA.Entity.users loginuser =Session["loginuser"] as COM.OA.Entity.users;
  97.                     //如果取不到跳转到登陆页
  98.                     if (loginuser == null)
  99.                     {
  100.                         this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
  101.                     }
  102.                     else
  103.                     {
  104.                         //取登陆人ID
  105.                         int LoginName = loginuser.u_id;
  106.                         //接收第几页
  107.                         string page = this.Request["page"];
  108.                         //声明全局变量
  109.                         System.Collections.Generic.IList<COM.OA.Entity.message> list;
  110.                         System.Collections.Generic.IList<COM.OA.Entity.message> lists = null;
  111.                         //设置where语句
  112.                         string where = "m_sendu_id='{0}'";
  113.                         where = string.Format(where, LoginName);
  114.                         //按where查询
  115.                         list = COM.OA.BLL.messageBLL.Select(where);
  116.                         //取数据库相关信息总条数
  117.                         int count = list.Count;
  118.                         //int转换成float类型
  119.                         float countd = count;
  120.                         //调用ceiling方法转换取值并转换成double类型
  121.                         double weiy = Math.Ceiling(countd / 3);
  122.                         //转换成int类型
  123.                         int weiye = Int32.Parse(weiy.ToString());
  124.                         int pages = 1;
  125.                         int shangpage = 0;
  126.                         int xiapage = 0;
  127.                         //判断是否第一次登陆,是就查前3条信息
  128.                         if (page == null)
  129.                         {
  130.                             lists = COM.OA.BLL.messageBLL.Select(3, 1, where);
  131.                             shangpage = 1;
  132.                             xiapage = 2;
  133.                         }
  134.                         //不是第一次登陆按页数查询
  135.                         else
  136.                         {
  137.                             pages = Int32.Parse(page);
  138.                             shangpage = pages - 1;
  139.                             xiapage = pages + 1;
  140.                             lists = COM.OA.BLL.messageBLL.Select(3, pages, where);
  141.                         }
  142.                         //判断查询出的内容是否为空
  143.                         if (lists.Count != 0)
  144.                         {
  145.                             foreach (COM.OA.Entity.message m in lists)
  146.                             {
  147.                                 //把ID转换成人名
  148.                                 COM.OA.Entity.users uu = COM.OA.BLL.usersBLL.Select(m.m_u_id);
  149.                                 int uid = uu.u_em_id;
  150.                                 string where2 = "em_id='{0}'";
  151.                                 where2 = string.Format(where2, uid);
  152.                                 System.Collections.Generic.IList<COM.OA.Entity.employee> emlist = COM.OA.BLL.employeeBLL.Select(where2);
  153.                                 COM.OA.Entity.employee em = emlist[0];
  154.             %>
  155.             <tr bgcolor='#FFFFFF'>
  156.                 <td style="width: 59px" align="center" colspan="">
  157.                  
  158.                     <input  name="deletecheck" type="checkbox" value="<%=m.m_id %>"  /></td>
  159.                 <td style="width: 938px" align="center">
  160.                 <a href="chakanfasongneirong.aspx?id=<%=m.m_id %>"><%=m.m_title%></a>
  161.                
  162.                 </td>
  163.                 <td style="width: 103px">
  164.                     <% if (m.m_isreturn == 0)
  165.                        {
  166.                     %>
  167.                     否
  168.                     <%
  169.                 }
  170.                 else if (m.m_isreturn == 1)
  171.                 {
  172.                         %>
  173.                         是
  174.                 <% } %>
  175.                 </td>
  176.                  <td style="width: 79px">
  177.                  
  178.                  <a href="fasongxiaoxi.aspx?name=<%=LoginName %>&datetime=<%=m.m_releasetime %>">转发</a>
  179.                 </td>
  180.                  <td style="width: 101px">
  181.                  
  182.                  <%=em.em_name%>
  183.                 </td>
  184.                  <td style="width: 270px">
  185.                  <%=m.m_releasetime%>
  186.                 </td>
  187.             </tr>
  188.             <%
  189.                 }
  190.                             %>
  191.                             
  192.                              <tr bgcolor='#FFFFFF'>                
  193.                 <td colspan="6" style="text-align: center">
  194.                 <% if (pages == 1)
  195.                    { %>
  196.                         <a href="fasongjilu.aspx?page=1">首页</a>                    
  197.                     
  198.                     <%}
  199.                       else
  200.                       { %>
  201.                     <a href="fasongjilu.aspx?page=<%=shangpage %>">上一页</a><% } %>&nbsp
  202.                      <% if (pages == weiye)
  203.                         {  %> <a href="fasongjilu.aspx?page=<%=weiye %>">尾页</a>
  204.                      <% }
  205.                         else
  206.                         {  %> <a href="fasongjilu.aspx?page=<%=xiapage %>">下一页</a>
  207.                      <% }%>
  208.                    
  209.                   </td>                
  210.             </tr>
  211.                             
  212.                             
  213.                             <%
  214.             }
  215.             else
  216.             { 
  217.                  %>
  218.                   <tr bgcolor='#FFFFFF'>
  219.                 
  220.                 <td colspan="6" style="text-align: center">
  221.                     <strong><span style="font-size: 24pt">
  222.                     无发送记录</span></strong></td>
  223.                 
  224.             </tr>
  225.                  <% } %>
  226.             <tr bgcolor='#FFFFFF'>
  227.                 <td style="width: 59px; height: 4px;">
  228.                     <input name="chkAll" type="checkbox" onclick="CheckAll(this.form)" /></td>
  229.                 <td colspan="5" style="text-align: left">
  230.                     全选</td>
  231.                 
  232.             </tr>
  233.             
  234.             <% }%>
  235.              <tr bgcolor='#FFFFFF'>
  236.                 <td style="width: 59px; height: 4px;"> <input  type="submit" name="Submit"  value="取消发送" /></td>
  237.                 <td style="width: 938px; height: 4px">
  238.                     </td>
  239.                 <td style="width: 103px; height: 4px;">
  240.                 </td>
  241.                  <td style="width: 79px; height: 4px;">
  242.                 </td>
  243.                  <td style="width: 101px; height: 4px;">
  244.                 </td>
  245.                  <td style="width: 270px; height: 4px;">
  246.                 </td>
  247.             </tr>
  248.            
  249.         </table>
  250.         
  251.     </form>
  252.     
  253.     
  254. </body>
  255. </html>