rlzy_plsckq.aspx
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:9k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="rlzy_plsckq.aspx.cs" Inherits="wc_rlzy_rlzy_plsckq" %>
- <!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>
- <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>
- <% COM.OA.Entity.users loginuser = Session["loginuser"] as COM.OA.Entity.users;
- if (loginuser == null)
- {
- this.Response.Write(string.Format(GetRedirect.ALLREDIRECT, "../login.aspx"));
- } %>
- <form id="Form1" name="form1" method="post" onsubmit="return check();" action="rlzy_kqsc.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/leftlin.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="17%"><div align="center"><strong>
- <input type="submit" name="Submit" value="删除" />
- </strong> </div></td>
- <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/10);
- int weiye = Int32.Parse(weiy.ToString());
- int pages=1;
- int shangpage=0;
- int xiapage=0;
- if (page == null)
- {
- il = COM.OA.BLL.attendanceBLL.Select(10, 1, where);
- shangpage = 1;
- xiapage = 2;
- }
- else
- {
- pages = Int32.Parse(page);
- shangpage=pages - 1;
- xiapage = pages + 1;
- il = COM.OA.BLL.attendanceBLL.Select(10, 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 if (xiawu > chidao1)
- {
- 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);
- string username = "";
- foreach (COM.OA.Entity.users user in ilist)
- {
- username = user.u_username;
- }
- //部门
- 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="17%" height="28"><div align="center">
- <input type="checkbox" name="deletecheck" value="<%=l.att_id %>" />
- </div></td>
- <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>
- <td width="50%"><div align="center"><span class="style2"><%=xxx %></span></div></td>
- </tr>
- </table></div>
- </div>
- </td>
- <td width="11%" height="28"><div align="center"><%=username %></div></td>
- <td width="19%" height="28"><div align="center"><%=dept %></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>
- <td width="17%" height="28"></td>
- </tr>
- <%} %>
- </table></div>
- <br />
- <table width="726" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <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>
- </form>
- </body>
- </html>