rlzy_bmqkxx.aspx
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:10k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="rlzy_bmqkxx.aspx.cs" Inherits="wc_rlzy_rlzy_bmqkxx" %>
- <!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">
- <!--
- .style1 {
- color: #FFFFFF;
- font-weight: bold;
- }
- .style13 {color: #5EAE19}
- .style14 {font-size: 12px}
- .style22 {font-size: 14px}
- .style23 {color: #999999}
- .style24 {color: #999999; font-size: 12px; }
- .style2 {color: #FF0000}
- .style21 {font-weight: bold; color: #5EAE19;}
- -->
- </style>
- <script type="text/javascript" language="javascript">
- function check()//表单判断
- {
- var str="";
- var j=0;
- var el=document.form1.getElementsByTagName("input")
- for(i=0;i<el.length;i++){
- if(el[i].type=="checkbox"){
- if((el[i].checked)&&(el[i].name.indexOf("deletecheck")!='-1')){
- j++;
- }
- }
- }
- if(j > 10000 || j<1)
- {
- alert("最少必须选择一项,最多不能超过100项!rt你现在选择了"+j+"项");
- return false;
- }
- if(!confirm('您确定要删除该记录吗?'))
- {
- return false
- }
- else
- document.form1.submit
- }
- function CheckAll(form)
- {
- for (var i=0;i<form.elements.length;i++){
- var e = form.elements[i];
- if (e.name != 'chkAll')
- {
- e.checked = form.chkAll.checked;
- }
- }
- }
- </script>
- </head>
- <body>
- <form id="Form1" name="form1" method="post" onsubmit="return check();" action="rlzy_kqsc.aspx">
- <%COM.OA.Entity.users loginuser =Session["loginuser"] as COM.OA.Entity.users;
- if (loginuser == null)
- {
- this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
- }
- else
- {%>
- <%
- string bmid = this.Request["bmid"];
- string whereid = "dept_id=" + bmid;
- System.Collections.Generic.IList<COM.OA.Entity.department> deparlist = COM.OA.BLL.departmentBLL.Select(whereid);
- System.Collections.Generic.List<COM.OA.Entity.department> deparl = (System.Collections.Generic.List<COM.OA.Entity.department>)deparlist;
- COM.OA.Entity.department de = new COM.OA.Entity.department();
- de = deparl[0];
- string deparname = de.dept_department;
- %>
- <div align="center">
- <table border="0" cellpadding="0" cellspacing="0" bgcolor="#5EAE19" style="width: 76%">
- <tr>
- <td bgcolor="#FFFFFF">
- <div align="center">
- <table width="600" height="21" border="0" cellpadding="0" cellspacing="0" background="../images/images_wc/line.gif" >
- <tr>
- <td><div align="center" class="style1"><%=deparname%> 考勤记录</div></td>
- </tr>
- </table>
- <table width="600" border="0" cellpadding="0" cellspacing="1" bgcolor="#5EAE19">
- <tr>
- <td bgcolor="#FFFFFF" style="height: 34px">
- <table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="399CA0">
- <tr>
- <td bgcolor="#FFFFFF" class="style5"><span class="style2">
- <%System.Collections.Generic.IList<COM.OA.Entity.department> departmentlist = COM.OA.BLL.departmentBLL.Select(); %>
- <%System.Collections.Generic.List<COM.OA.Entity.department> list1 = (System.Collections.Generic.List<COM.OA.Entity.department>)departmentlist; %>
- <%list1.Reverse(); %>
- <%foreach (COM.OA.Entity.department depar in list1)%>
- <%{%>
- <a href="rlzy_bmqkxx.aspx?bmid=<%=depar.dept_id%>"><%=depar.dept_department%></a>
- <%}%>
- </span></td>
- </tr>
- </table></td>
- </tr>
- </table>
- </div>
- <table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="399CA0">
- </table>
- </td>
- </tr>
- </table>
- <table width="600" border="0" cellpadding="2" cellspacing="1" bgcolor="#669900">
- <tr bgcolor="#FFFFFF">
- <td width="17%">
- <div align="center"><strong>
- <input type="submit" name="Submit" font-bold="True" value="删除" />
- </strong> </div></td>
- <td width="17%"><div align="center"><strong>日 期</strong></div></td>
- <td width="14%"><div align="center"><strong>星 期</strong></div></td>
- <td width="26%"><div align="center"><strong>时 间</strong></div></td>
- <td width="16%"><div align="center"><strong>姓 名</strong></div></td>
- </tr>
- <%
- string where = "att_dept_id=" + bmid;
- System.Collections.Generic.IList<COM.OA.Entity.attendance> il = COM.OA.BLL.attendanceBLL.Select(where);
- System.Collections.Generic.List<COM.OA.Entity.attendance> list = (System.Collections.Generic.List<COM.OA.Entity.attendance>)il;
- list.Reverse();
- %>
- <%foreach(COM.OA.Entity.attendance l in list) %>
- <%{ %>
- <%
- 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
- {
- 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 uid = l.att_u_id;
- string whereuid ="u_id="+uid ;
- System.Collections.Generic.IList<COM.OA.Entity.users> ilu = COM.OA.BLL.usersBLL.Select(whereuid);
- System.Collections.Generic.List<COM.OA.Entity.users> listu = (System.Collections.Generic.List<COM.OA.Entity.users>)ilu;
- COM.OA.Entity.users user = new COM.OA.Entity.users();
- user = listu[0];
- int emid = user.u_em_id;
- string whereemid = "em_id=" + emid;
- System.Collections.Generic.IList<COM.OA.Entity.employee> ilem = COM.OA.BLL.employeeBLL.Select(whereemid);
- System.Collections.Generic.List<COM.OA.Entity.employee> listem = (System.Collections.Generic.List<COM.OA.Entity.employee>)ilem;
- COM.OA.Entity.employee em = new COM.OA.Entity.employee();
- em = listem[0];
- string emName = em.em_name;
- %>
- <tr bgcolor="#FFFFFF" onmousemove= "this.style.backgroundColor = '#EEEEEE'">
- <td width="17%" height="28"><div align="center">
- <input type="checkbox" name="deletecheck" value="<%=l.att_id %>" /></div></td>
- <td width="17%" height="28"><div align="center"><span class="style13"><%=t%></span></div></td>
- <td width="14%" height="28"><div align="center" class="style13"><%=weekstr%>
- </div></td>
- <td width="26%"><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>
- <td width="50%"><div align="center"><span class="style2"><%=xxx%></span> </div></td>
- </tr>
- </table>
- </div>
- </div>
- </td>
- <td width="16%" height="28"><div align="center"> <span class="style13"><%=emName%></span></div></td>
- </tr>
- <%} %>
- <tr bgcolor="#FFFFFF">
- <td width="17%" height="28">
- <input name="chkAll" type="checkbox" onclick="CheckAll(this.form)" /></td>
- <td width="17%" height="28">全选</td>
- <td width="14%" height="28"></td>
- <td width="17%" height="28"></td>
- <td width="17%" height="28"></td>
- </tr>
- </table>
- <table width="433" border="0" cellpadding="0" cellspacing="0" >
- <tr>
- <td width="170">总共 <%=list.Count%> <%} %>条记录</td>
- <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>
- </tr>
- </table>
- <br/>
- <table border="0" width="50%" align="center">
- <tr>
- <td width="23%" align="center">
- </td>
- <td width="31%" align="center">
- </td>
- <td width="23%" align="center">
- </td>
- <td width="23%" align="center">
- </td>
- </tr>
- </table>
- </div>
- </form>
- </body>
- </html>