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

OA系统

开发平台:

C#

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