fasongjilu.aspx
资源名称:OASystem.rar [点击查看]
上传用户:lishan0805
上传日期:2019-12-08
资源大小:12048k
文件大小:10k
源码类别:
OA系统
开发平台:
C#
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="fasongjilu.aspx.cs" Inherits="fasongjilu" %>
- <!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 id="Head1" runat="server">
- <title>发送记录</title>
- <style type="text/css">
- div.RoundedCorner{background: #5AAE18}
- b.rtop, b.rbottom{display:block;background: #FFF}
- b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18}
- b.r1{margin: 0 4px}
- b.r2{margin: 0 3px}
- b.r3{margin: 0 2px}
- b.rtop b.r4, {margin: 0 1px;height: 1px}
- .style1 {
- font-size: 13px;
- color: #FFFFFF;
- font-weight: bold;
- }
- </style>
- <style type="text/css">
- <!--
- .style2 {font-size: 12px}
- -->
- </style>
- <script type="text/javascript">
- 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>
- <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 > 100 || j<1)
- {
- alert("最少必须选择一项,最多不能超过100项!rt你现在选择了"+j+"项");
- return false;
- }
- if(!confirm('您确定要删除吗?'))
- {
- return false
- }
- else
- document.form1.submit();
- }
- </script>
- <style type="text/css">
- <!--
- body {
- margin-top: 2px;
- }
- -->
- </style>
- <link href="../css/textarea.css" rel="stylesheet" type="text/css" />
- </head>
- <body style="text-align: center">
- <form name="form1" id="form1" onsubmit="return check();" action="deletefasongcheck.aspx">
- <table border="0" bgcolor="#5AAE18">
- <tr bgcolor='#FFFFFF'>
- <td colspan="6" align="center">
- <div class="RoundedCorner">
- <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <span class="style1">发 送 记 录</span></div></td>
- </tr>
- <tr bgcolor='#FFFFFF'>
- <td style="width: 59px; height: 1px;" align="center">
- <input type="submit" name="Submit" value="取消发送" /></td>
- <td style="width: 938px; height: 1px" align="center">
- 标题</td>
- <td style="width: 103px; height: 1px;" align="center">
- 读否</td>
- <td style="width: 79px; height: 1px;" align="center">
- 转发</td>
- <td style="width: 101px; height: 1px;" align="center">
- 接收人</td>
- <td style="width: 270px; height: 1px;" align="center">
- 时间</td>
- </tr>
- <%
- //取登陆人信息
- 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
- {
- //取登陆人ID
- int LoginName = loginuser.u_id;
- //接收第几页
- string page = this.Request["page"];
- //声明全局变量
- System.Collections.Generic.IList<COM.OA.Entity.message> list;
- System.Collections.Generic.IList<COM.OA.Entity.message> lists = null;
- //设置where语句
- string where = "m_sendu_id='{0}'";
- where = string.Format(where, LoginName);
- //按where查询
- list = COM.OA.BLL.messageBLL.Select(where);
- //取数据库相关信息总条数
- int count = list.Count;
- //int转换成float类型
- float countd = count;
- //调用ceiling方法转换取值并转换成double类型
- double weiy = Math.Ceiling(countd / 3);
- //转换成int类型
- int weiye = Int32.Parse(weiy.ToString());
- int pages = 1;
- int shangpage = 0;
- int xiapage = 0;
- //判断是否第一次登陆,是就查前3条信息
- if (page == null)
- {
- lists = COM.OA.BLL.messageBLL.Select(3, 1, where);
- shangpage = 1;
- xiapage = 2;
- }
- //不是第一次登陆按页数查询
- else
- {
- pages = Int32.Parse(page);
- shangpage = pages - 1;
- xiapage = pages + 1;
- lists = COM.OA.BLL.messageBLL.Select(3, pages, where);
- }
- //判断查询出的内容是否为空
- if (lists.Count != 0)
- {
- foreach (COM.OA.Entity.message m in lists)
- {
- //把ID转换成人名
- COM.OA.Entity.users uu = COM.OA.BLL.usersBLL.Select(m.m_u_id);
- int uid = uu.u_em_id;
- string where2 = "em_id='{0}'";
- where2 = string.Format(where2, uid);
- System.Collections.Generic.IList<COM.OA.Entity.employee> emlist = COM.OA.BLL.employeeBLL.Select(where2);
- COM.OA.Entity.employee em = emlist[0];
- %>
- <tr bgcolor='#FFFFFF'>
- <td style="width: 59px" align="center" colspan="">
- <input name="deletecheck" type="checkbox" value="<%=m.m_id %>" /></td>
- <td style="width: 938px" align="center">
- <a href="chakanfasongneirong.aspx?id=<%=m.m_id %>"><%=m.m_title%></a>
- </td>
- <td style="width: 103px">
- <% if (m.m_isreturn == 0)
- {
- %>
- 否
- <%
- }
- else if (m.m_isreturn == 1)
- {
- %>
- 是
- <% } %>
- </td>
- <td style="width: 79px">
- <a href="fasongxiaoxi.aspx?name=<%=LoginName %>&datetime=<%=m.m_releasetime %>">转发</a>
- </td>
- <td style="width: 101px">
- <%=em.em_name%>
- </td>
- <td style="width: 270px">
- <%=m.m_releasetime%>
- </td>
- </tr>
- <%
- }
- %>
- <tr bgcolor='#FFFFFF'>
- <td colspan="6" style="text-align: center">
- <% if (pages == 1)
- { %>
- <a href="fasongjilu.aspx?page=1">首页</a>
- <%}
- else
- { %>
- <a href="fasongjilu.aspx?page=<%=shangpage %>">上一页</a><% } %> 
- <% if (pages == weiye)
- { %> <a href="fasongjilu.aspx?page=<%=weiye %>">尾页</a>
- <% }
- else
- { %> <a href="fasongjilu.aspx?page=<%=xiapage %>">下一页</a>
- <% }%>
- </td>
- </tr>
- <%
- }
- else
- {
- %>
- <tr bgcolor='#FFFFFF'>
- <td colspan="6" style="text-align: center">
- <strong><span style="font-size: 24pt">
- 无发送记录</span></strong></td>
- </tr>
- <% } %>
- <tr bgcolor='#FFFFFF'>
- <td style="width: 59px; height: 4px;">
- <input name="chkAll" type="checkbox" onclick="CheckAll(this.form)" /></td>
- <td colspan="5" style="text-align: left">
- 全选</td>
- </tr>
- <% }%>
- <tr bgcolor='#FFFFFF'>
- <td style="width: 59px; height: 4px;"> <input type="submit" name="Submit" value="取消发送" /></td>
- <td style="width: 938px; height: 4px">
- </td>
- <td style="width: 103px; height: 4px;">
- </td>
- <td style="width: 79px; height: 4px;">
- </td>
- <td style="width: 101px; height: 4px;">
- </td>
- <td style="width: 270px; height: 4px;">
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>