rlzy_sykq.aspx
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:9k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="rlzy_sykq.aspx.cs" Inherits="rlzy_sykq" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>所有考勤</title>
- <link href="../css/link.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- <!--
- .style5 {font-weight: bold}
- .style10 {color: #5EAE19; font-weight: bold; }
- .style13 {color: #5EAE19}
- .style14 {font-size: 12px}
- .style1 {
- color: #FFFFFF;
- font-weight: bold;
- }
- .style2 {color: #FF0000}
- .style22 {font-size: 14px}
- .style23 {color: #999999}
- .style24 {color: #999999; font-size: 12px; }
- -->
- </style>
- </head>
- <body>
- <% COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
- if (loginuser == null)
- {
- this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
- } %>
- <div align="center">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="6" height="21"><img alt="" src="../images/images_wc/leftlin1.gif" width="6" height="21" /></td>
- <td width="936" bgcolor="#5AAE18"><div align="center"><span class="style1">所 有 考 勤 记 录</span></div></td>
- <td width="6" height="21"><img alt="" src="../images/images_wc/rightlin.gif" width="6" height="21" /></td>
- </tr>
- </table>
- <div class="style14">
- <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#5EAE19">
- <tr bgcolor="#FFFFFF">
- <td width="11%"><div align="center" class="style5">日 期</div></td>
- <td width="10%"><div align="center"><strong>星 期</strong></div></td>
- <td width="25%"><div align="center"><strong> 时 间</strong></div></td>
- <td width="11%"><div align="center"><strong>姓 名</strong></div></td>
- <td width="19%"><div align="center"><strong>部 门</strong></div></td>
- </tr>
- <%
- string page=this.Request["page"];
- System.Collections.Generic.IList<COM.OA.Entity.attendance> il;
- string where = "1=1";
- il = COM.OA.BLL.attendanceBLL.Select(where);
- int count = il.Count;
- float countd=count;
- double weiy = Math.Ceiling(countd/5);
- int weiye = Int32.Parse(weiy.ToString());
- int pages=1;
- int shangpage=0;
- int xiapage=0;
- if (page == null)
- {
- il = COM.OA.BLL.attendanceBLL.Select(5, 1, where);
- shangpage = 1;
- xiapage = 2;
- }
- else
- {
- pages = Int32.Parse(page);
- shangpage=pages - 1;
- xiapage = pages + 1;
- il = COM.OA.BLL.attendanceBLL.Select(5, pages, where);
- }
- if (il.Count != 0)
- {
- foreach (COM.OA.Entity.attendance l in il)
- {
- string t = l.att_date.ToString("yyy-MM-dd");//取日期部分
- string weekstr =l.att_date.DayOfWeek.ToString();
- switch (weekstr)
- {
- case "Monday": weekstr = "星期一";
- break;
- case "Tuesday": weekstr = "星期二";
- break;
- case "Wednesday": weekstr = "星期三";
- break;
- case "Thursday": weekstr = "星期四";
- break;
- case "Friday": weekstr = "星期五";
- break;
- case "Saturday": weekstr = "星期六";
- break;
- case "Sunday": weekstr = "星期日"; break;
- }
- //上午时间 判断
- string swshijian = l.att_forenoontime.ToString("HH:mm:ss");//取时间部分 HH24小时 hh12小时
- DateTime shangwu = DateTime.Parse(swshijian);
- DateTime chidao = DateTime.Parse(8 + ":" +30 + ":" + 0 + 0);
- string sss = "";
- if (swshijian.Equals("00:00:00"))
- {
- sss = "上午未考勤";
- }
- else
- {
- if (shangwu > chidao)
- {
- sss = "上午迟到";
- }
- else
- {
- sss = shangwu.ToString("HH:mm:ss");
- }
- }
- //下午时间判断
- string xwshijian =l.att_afternoontime.ToString("HH:mm:ss");
- DateTime xiawu = DateTime.Parse(xwshijian);
- DateTime chidao1 = DateTime.Parse(17 + ":" +30 + ":" + 0 + 0);
- string xxx = "";
- if (xwshijian.Equals("00:00:00"))
- {
- xxx = "下午未考勤";
- }
- else
- {
- xxx = xiawu.ToString("HH:mm:ss");
- }
- //用户名
- int userid = l.att_u_id;
- string whereuser = "u_id=" + userid;
- System.Collections.Generic.IList<COM.OA.Entity.users> ilist= COM.OA.BLL.usersBLL.Select(whereuser);
- System.Collections.Generic.List<COM.OA.Entity.users> list = (System.Collections.Generic.List<COM.OA.Entity.users>)ilist;
- COM.OA.Entity.users u = new COM.OA.Entity.users();
- u = list[0];
- int emid = u.u_em_id;//users表中的em_id 通过查em_name
- string whereem = "em_id=" + emid;
- System.Collections.Generic.IList<COM.OA.Entity.employee> emilist = COM.OA.BLL.employeeBLL.Select(whereem);
- System.Collections.Generic.List<COM.OA.Entity.employee> emlist = (System.Collections.Generic.List<COM.OA.Entity.employee>)emilist;
- COM.OA.Entity.employee em = new COM.OA.Entity.employee();
- em = emlist[0];
- string emName = em.em_name;
- //部门
- int bumen = l.att_dept_id;
- string w = "dept_id=" + bumen; System.Collections.Generic.IList<COM.OA.Entity.department> i = COM.OA.BLL.departmentBLL.Select(w);
- string dept = "";
- foreach (COM.OA.Entity.department d in i)
- {
- dept = d.dept_department;
- }
- %>
- <tr bgcolor="#FFFFFF" onmousedown= "this.style.backgroundColor = '#EEEEEE'">
- <td width="11%" height="28"><div align="center"><%=t %></div></td>
- <td width="10%" height="28"><div align="center"><%=weekstr %></div></td>
- <td width="25%"><div align="center" class="style14">
- <div align="left">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="49%"><div align="center"><span class="style2"><%=sss %></span></div></td>
- <td width="1%"><div align="center"><span class="style13">|</span></div></td>
- <%
- string xia = "";
- if (xxx.Equals("00:00:00"))
- {
- xia = "下午未考勤";
- }
- else
- {
- xia = xxx;
- }
- %>
- <td width="50%"><div align="center"><span class="style2"><%=xia%></span></div></td>
- </tr>
- </table></div>
- </div>
- </td>
- <td width="11%" height="28"><div align="center"><%=emName%></div></td>
- <td width="19%" height="28"><div align="center"><%=dept %></div></td>
- </tr>
- <%} %>
- <tr bgcolor="#FFFFFF">
- <td bgcolor="#FFFFFF">
- <% if (pages == 1)
- { %>
- <a href="rlzy_sykq.aspx?page=1">首页</a>
- <%}
- else
- { %>
- <a href="rlzy_sykq.aspx?page=<%=shangpage %>">上一页</a><% } %> 
- <% if (pages == weiye)
- { %>
- <a href="rlzy_sykq.aspx?page=<%=weiye %>">尾页</a>
- <% }
- else
- { %>
- <a href="rlzy_sykq.aspx?page=<%=xiapage %>">下一页</a>
- <% } %>
- </td>
- </tr>
- <%} %>
- </table></div>
- <br />
- <table width="726" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="116"><a href="rlzy_plsckq.aspx"><span class="style14">批量删除考勤数据</span></a></td>
- <td width="203"><span class="style14">(总共 <%=il.Count%> 条记录)</span> </td>
- <td width="107"><a href="javascript:history.go(-1)"><img alt="" src="../images/images_wc/back.gif" width="37" height="45" border="0" /></a></td>
- </tr>
- </table>
- <br />
- <br />
- <table border="0" width="50%" align="center">
- </table>
- <br />
- <p> </p>
- </div>
- </body>
- </html>