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

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="yueguanli.aspx.cs" Inherits="wx_zongjie_yueguanli" %>
  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. .style2 {font-size: 12px}
  9. -->
  10. </style>
  11. <link href="../css/input.css" rel="stylesheet" type="text/css">
  12. <link href="../css/link.css" rel="stylesheet" type="text/css">
  13. <style type="text/css">
  14. <!--
  15. .style3 {
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. }
  19. .style4 {color: #5AAE18}
  20. .style6 {color: #000000}
  21. -->
  22. </style>
  23. <link href="../../../css/link1.css" rel="stylesheet" type="text/css">
  24. </head>
  25. <body style="text-align: center">
  26. <%
  27.                  //取登陆人信息 
  28.                  COM.OA.Entity.users loginuser =Session["loginuser"] as COM.OA.Entity.users;
  29.                  //如果取不到跳转到登陆页
  30.                   if (loginuser == null)
  31.                   {
  32.                       this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
  33.                   }
  34.  %>
  35.     <form id="form1" runat="server">
  36.     <div>
  37.         <table style="width: 653px; height: 147px;" border="0" bgcolor="#5AAE18">
  38.             <tr bgcolor='#FFFFFF'>
  39.                 <td style="width: 175px;" colspan="2"  bgcolor="#5AAE18">
  40.                     <div style="text-align: center"><span class="style7"><span class="style3"><span class="style1">年 度 总 结  管 理</span></span></span></div></td>                              
  41.             </tr>
  42.             <% 
  43.                 //接收第几页
  44.                 string page=this.Request["page"];
  45.                 //声明全局变量
  46.                 System.Collections.Generic.IList<COM.OA.Entity.worksumup> wo;
  47.                 //设置where语句
  48.                 String where = "ws_st_id='{0}'";
  49.                 where = string.Format(where, 2);
  50.                 //按where查询
  51.                 wo = COM.OA.BLL.worksumupBLL.Select(where);
  52.                 //取数据库相关信息总条数
  53.                 int count = wo.Count;
  54.                 //int转换成float类型
  55.                 float countd=count;
  56.                 //调用ceiling方法转换取值并转换成double类型
  57.                 double weiy = Math.Ceiling(countd/3);
  58.                 //转换成int类型
  59.                 int weiye = Int32.Parse(weiy.ToString());
  60.                 int pages=1;
  61.                 int shangpage=0;
  62.                 int xiapage=0;
  63.                 //判断是否第一次登陆,是就查前3条信息
  64.                 if (page == null)
  65.                 {
  66.                     
  67.                     wo = COM.OA.BLL.worksumupBLL.Select(3, 1, where);
  68.                     shangpage = 1;
  69.                     xiapage = 2;
  70.                 }
  71.                 //不是第一次登陆按页数查询
  72.                 else
  73.                 {
  74.                     pages = Int32.Parse(page);
  75.                     shangpage=pages - 1;
  76.                     xiapage = pages + 1;
  77.                      wo = COM.OA.BLL.worksumupBLL.Select(3, pages, where);
  78.                 }
  79.                 //判断查询出的内容是否为空
  80.                 if (wo.Count != 0)
  81.                 {
  82.                     foreach(COM.OA.Entity.worksumup ww in wo){
  83.             %>
  84.               <tr bgcolor='#FFFFFF'>
  85.                 <td style="width: 175px; text-align: center;">
  86.                     月份</td>
  87.                 <td style="width: 470px">
  88.                     <%=ww.ws_year%>年<%=ww.ws_month %>月</td>               
  89.             </tr>
  90.               <tr bgcolor='#FFFFFF'>
  91.                 <td style="width: 175px; height: 21px; text-align: center;">
  92.                     常规工作</td>
  93.                 <td style="height: 21px; width: 470px;">
  94.                     <%=ww.ws_generalwork %></td>               
  95.             </tr>
  96.               <tr bgcolor='#FFFFFF'>
  97.                 <td style="width: 175px; text-align: center;">
  98.                     下周工作计划</td>
  99.                 <td style="width: 470px">
  100.                     <%=ww.ws_nextplan%></td>               
  101.             </tr>
  102.               <tr bgcolor='#FFFFFF'>
  103.                 <td style="width: 175px; height: 21px; text-align: center;">
  104.                     创新,问题反馈,意见与建议</td>
  105.                 <td style="height: 21px; width: 470px;">
  106.                     <%=ww.ws_advice %></td>               
  107.             </tr>
  108.               <tr bgcolor='#FFFFFF'>
  109.                 <td style="width: 175px">
  110.                     &nbsp;&nbsp;
  111.                 </td>
  112.                 <td style="width: 470px">
  113.                     时间:<%=ww.ws_time %></td>               
  114.             </tr>
  115.               <tr bgcolor='#FFFFFF'>
  116.                 <td style="width: 175px; height: 21px; text-align: center;" colspan="2">
  117.                     &nbsp;&nbsp;
  118.                 </td>                              
  119.             </tr>
  120.             <%
  121.                 }
  122.             %>
  123.                   <tr bgcolor='#FFFFFF'>
  124.                 <td style="width: 175px; height: 21px; text-align: center;" colspan="2">
  125.                     <% if (pages == 1)
  126.                        { %>
  127.                         <a href="yueguanli.aspx?page=1">首页</a>                    
  128.                     
  129.                     <%}
  130.                       else
  131.                       { %>
  132.                     <a href="yueguanli.aspx?page=<%=shangpage %>">上一页</a><% } %>&nbsp
  133.                      <% if (pages == weiye){  %> <a href="yueguanli.aspx?page=<%=weiye %>">尾页</a>
  134.                      <% }else{  %> <a href="yueguanli.aspx?page=<%=xiapage %>">下一页</a>
  135.                      <% } %>
  136.                 </td>                              
  137.             </tr>
  138.             <%
  139.             }
  140.            else { 
  141.                     %>
  142.                 <tr bgcolor='#FFFFFF'>
  143.                 <td style="width: 175px; text-align: center;" colspan="2">
  144.                     无记录</td>
  145.                               
  146.             </tr>
  147.                     <%
  148.                 }
  149.           %>
  150.         </table>
  151.     
  152.     </div>
  153.     </form>
  154. </body>
  155. </html>