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

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="rlzy_bmqkxx.aspx.cs" Inherits="wc_rlzy_rlzy_bmqkxx" %>
  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>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  6. <title>部门考勤记录</title>
  7. <link href="../css/link.css"rel="stylesheet" type="text/css" />
  8. <style type="text/css">
  9. <!--
  10. .style1 {
  11. color: #FFFFFF;
  12. font-weight: bold;
  13. }
  14. .style13 {color: #5EAE19}
  15. .style14 {font-size: 12px}
  16. .style22 {font-size: 14px}
  17. .style23 {color: #999999}
  18. .style24 {color: #999999; font-size: 12px; }
  19. .style2 {color: #FF0000}
  20. .style21 {font-weight: bold; color: #5EAE19;}
  21. -->
  22. </style>
  23. <script type="text/javascript" language="javascript">
  24.   function check()//表单判断
  25.   {
  26.    var str="";
  27.    var j=0;
  28.    var el=document.form1.getElementsByTagName("input")
  29.    for(i=0;i<el.length;i++){
  30.     if(el[i].type=="checkbox"){
  31.      if((el[i].checked)&&(el[i].name.indexOf("deletecheck")!='-1')){
  32.       j++;
  33.      }
  34.     }
  35.    }
  36.    if(j > 10000 || j<1)
  37.    {
  38.     alert("最少必须选择一项,最多不能超过100项!rt你现在选择了"+j+"项");
  39.     return false;
  40.    }
  41.    
  42.      if(!confirm('您确定要删除该记录吗?'))
  43.  {
  44. return false
  45. else 
  46. document.form1.submit
  47. }
  48. function CheckAll(form)
  49. {
  50.     for (var i=0;i<form.elements.length;i++){
  51.         var e = form.elements[i];
  52.         if (e.name != 'chkAll')
  53.         {
  54.             e.checked = form.chkAll.checked;
  55.         }
  56.          
  57.       }
  58. </script>
  59. </head>
  60. <body>
  61. <form id="Form1" name="form1" method="post" onsubmit="return check();" action="rlzy_kqsc.aspx">
  62. <%COM.OA.Entity.users loginuser =Session["loginuser"] as COM.OA.Entity.users;
  63.          if (loginuser == null)
  64.          {
  65.              this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
  66.          } 
  67.          else
  68.          {%>
  69. <%
  70.     string bmid = this.Request["bmid"];
  71.     string whereid = "dept_id=" + bmid;
  72.     System.Collections.Generic.IList<COM.OA.Entity.department> deparlist = COM.OA.BLL.departmentBLL.Select(whereid);
  73.     System.Collections.Generic.List<COM.OA.Entity.department> deparl = (System.Collections.Generic.List<COM.OA.Entity.department>)deparlist;
  74.     COM.OA.Entity.department de = new COM.OA.Entity.department();
  75.     de = deparl[0];
  76.     string deparname = de.dept_department;
  77. %>
  78. <div align="center">
  79.   <table border="0" cellpadding="0" cellspacing="0" bgcolor="#5EAE19" style="width: 76%">
  80.     <tr>
  81.       <td bgcolor="#FFFFFF">
  82.       <div align="center">
  83.         <table width="600"  height="21" border="0" cellpadding="0" cellspacing="0" background="../images/images_wc/line.gif" >
  84.           <tr>
  85.             <td><div align="center" class="style1"><%=deparname%>  考勤记录</div></td>
  86.           </tr>
  87.           </table>
  88.   <table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#5EAE19">
  89.     <tr>
  90.       <td bgcolor="#FFFFFF" style="height: 34px">
  91.       
  92.       <table width="100%"  border="0" cellpadding="3" cellspacing="0" bgcolor="399CA0">
  93.         <tr>
  94.           <td bgcolor="#FFFFFF" class="style5"><span class="style2">
  95.         <%System.Collections.Generic.IList<COM.OA.Entity.department> departmentlist = COM.OA.BLL.departmentBLL.Select(); %>
  96.         <%System.Collections.Generic.List<COM.OA.Entity.department> list1 = (System.Collections.Generic.List<COM.OA.Entity.department>)departmentlist; %>
  97.         <%list1.Reverse(); %>
  98.         <%foreach (COM.OA.Entity.department depar in list1)%>
  99.         <%{%>
  100.         <a href="rlzy_bmqkxx.aspx?bmid=<%=depar.dept_id%>"><%=depar.dept_department%></a>&nbsp;&nbsp;
  101.         <%}%>
  102.     </span></td>
  103.         </tr>
  104.       </table></td>
  105.     </tr>
  106.   </table>
  107.        </div>
  108.        <table width="100%"  border="0" cellpadding="3" cellspacing="0" bgcolor="399CA0">
  109.       </table>
  110.        </td>
  111.     </tr>
  112.    </table>
  113.         <table width="600"  border="0" cellpadding="2" cellspacing="1" bgcolor="#669900">
  114.             <tr bgcolor="#FFFFFF">
  115.               <td width="17%">
  116.               <div align="center"><strong>
  117.               <input  type="submit" name="Submit" font-bold="True"  value="删除" />
  118.                </strong>&nbsp;</div></td>
  119.               <td width="17%"><div align="center"><strong>日  期</strong></div></td>
  120.               <td width="14%"><div align="center"><strong>星 期</strong></div></td>
  121.               <td width="26%"><div align="center"><strong>时 间</strong></div></td>
  122.               <td width="16%"><div align="center"><strong>姓 名</strong></div></td>
  123.             </tr>
  124.             <%
  125.                 
  126.                 string where = "att_dept_id=" + bmid;
  127.                 System.Collections.Generic.IList<COM.OA.Entity.attendance> il = COM.OA.BLL.attendanceBLL.Select(where);
  128.                 System.Collections.Generic.List<COM.OA.Entity.attendance> list = (System.Collections.Generic.List<COM.OA.Entity.attendance>)il;
  129.                 list.Reverse();
  130.                             
  131.             %>
  132.             <%foreach(COM.OA.Entity.attendance l in list) %>
  133.             <%{ %>
  134.             <%
  135.               
  136.                 string t = l.att_date.ToString("yyy-MM-dd");//取日期部分
  137.                 string weekstr = l.att_date.DayOfWeek.ToString();
  138.                 switch (weekstr)
  139.                 {
  140.                     case "Monday": weekstr = "星期一"; break;
  141.                     case "Tuesday": weekstr = "星期二"; break;
  142.                     case "Wednesday": weekstr = "星期三"; break;
  143.                     case "Thursday": weekstr = "星期四"; break;
  144.                     case "Friday": weekstr = "星期五"; break;
  145.                     case "Saturday": weekstr = "星期六"; break;
  146.                     case "Sunday": weekstr = "星期日"; break;
  147.                 }
  148.                 //上午时间 判断
  149.                 string swshijian = l.att_forenoontime.ToString("HH:mm:ss");//取时间部分 HH24小时 hh12小时
  150.                 DateTime shangwu = DateTime.Parse(swshijian);
  151.                 DateTime chidao = DateTime.Parse(8 + ":" + 30 + ":" + 0 + 0);
  152.                 string sss = "";
  153.                 if (swshijian.Equals("00:00:00"))
  154.                 {
  155.                     sss = "上午未考勤";
  156.                 }
  157.                 else
  158.                 {
  159.                     sss = shangwu.ToString("HH:mm:ss");
  160.                 }
  161.                 //下午时间判断
  162.                   
  163.                 string xwshijian = l.att_afternoontime.ToString("HH:mm:ss");
  164.                 DateTime xiawu = DateTime.Parse(xwshijian);
  165.                 DateTime chidao1 = DateTime.Parse(17 + ":" + 30 + ":" + 0 + 0);
  166.                 string xxx = "";
  167.                 if (xwshijian.Equals("00:00:00"))
  168.                 {
  169.                     xxx = "下午未考勤";
  170.                 }
  171.                 else
  172.                 {
  173.                     xxx = xiawu.ToString("HH:mm:ss");
  174.                 }
  175.                 //用户名
  176.                 int uid = l.att_u_id;
  177.                 string whereuid ="u_id="+uid ;
  178.                 System.Collections.Generic.IList<COM.OA.Entity.users> ilu = COM.OA.BLL.usersBLL.Select(whereuid);
  179.                 System.Collections.Generic.List<COM.OA.Entity.users> listu = (System.Collections.Generic.List<COM.OA.Entity.users>)ilu;
  180.                 COM.OA.Entity.users user = new COM.OA.Entity.users();
  181.                 user = listu[0];
  182.                 int emid = user.u_em_id;
  183.                 string whereemid = "em_id=" + emid;
  184.                 System.Collections.Generic.IList<COM.OA.Entity.employee> ilem = COM.OA.BLL.employeeBLL.Select(whereemid);
  185.                 System.Collections.Generic.List<COM.OA.Entity.employee> listem = (System.Collections.Generic.List<COM.OA.Entity.employee>)ilem;
  186.                 COM.OA.Entity.employee em = new COM.OA.Entity.employee();
  187.                 em = listem[0];
  188.                 string emName = em.em_name;
  189.             %>
  190.             <tr  bgcolor="#FFFFFF" onmousemove= "this.style.backgroundColor = '#EEEEEE'">
  191.               <td width="17%" height="28"><div align="center">
  192.                   <input type="checkbox" name="deletecheck" value="<%=l.att_id %>" /></div></td>
  193.               <td width="17%" height="28"><div align="center"><span class="style13"><%=t%></span></div></td>
  194.               <td width="14%" height="28"><div align="center" class="style13"><%=weekstr%>
  195.               </div></td>
  196.               <td width="26%"><div align="center" class="style14">
  197.                 <div align="left">                  
  198.                   <table width="100%" border="0" cellpadding="0" cellspacing="0">
  199.                     <tr>
  200.                       <td width="49%"><div align="center">
  201.                          <span class="style2"><%=sss%></span>      
  202.                           </div>  
  203.                         </td>
  204.                       <td width="1%"><div align="center"><span class="style13">|</span></div></td>
  205.                       <td width="50%"><div align="center"><span class="style2"><%=xxx%></span> </div></td>
  206.                     </tr>
  207.                   </table>
  208.                 </div>
  209.               </div>
  210.               </td>
  211.               <td width="16%" height="28"><div align="center"> <span class="style13"><%=emName%></span></div></td>
  212.            </tr>
  213.            <%} %>
  214.            <tr bgcolor="#FFFFFF">
  215.             <td width="17%" height="28">
  216.                   <input name="chkAll" type="checkbox" onclick="CheckAll(this.form)" /></td>
  217.             <td width="17%" height="28">全选</td>  
  218.             <td width="14%" height="28"></td>
  219.             <td width="17%" height="28"></td>  
  220.             <td width="17%" height="28"></td> 
  221.            </tr>
  222.            </table>
  223.     <table width="433" border="0" cellpadding="0" cellspacing="0" >
  224.         <tr>
  225.         <td width="170">总共  <%=list.Count%>  <%} %>条记录</td>
  226.         <td width="64"><a href="javascript:history.go(-1)"><img alt="" src="../images/images_wc/back.gif" width="37" height="45" border="0" /></a></td>
  227.         </tr>
  228.     </table>
  229.   <br/>
  230. <table border="0" width="50%" align="center">
  231.   <tr>
  232.     <td width="23%" align="center">
  233.     </td>
  234.     <td width="31%" align="center">
  235.     </td>
  236.     <td width="23%" align="center">
  237.     </td>
  238.     <td width="23%" align="center">
  239.     </td>
  240.   </tr>
  241. </table>
  242. </div>
  243. </form>
  244. </body>
  245. </html>