<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="TotCms.Web.Office.StaffGo.Manage" %>

<!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 runat="server">
    <title>人员去向</title> 
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <link href="../../js/jquery-ui-1.8.10/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery.ui.core.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery.ui.widget.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery.ui.datepicker.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('.dates').datepicker($.datepicker.regional["zh-CN"]);
        });
        function GetDept(pid, cid, did) {
            var retValue, i, sele;
            var childs = document.getElementById(did);
            childs.length = 0;
            //ajax
            $.ajax({
                url: '../Dept/GetDeptByOrg.aspx?classid=' + pid,      //异步方法
                type: 'get',
                dataType: 'xml',
                timeout: 5000,                            //延迟1秒执行
                error: function () {                        //返回失败后
                    alert('Error loading XML document');
                },
                success: function (xml) {              //返回成功
                    $(xml).find("category").each(function () {         //找到根节点
                        var id = $(this).children("id").text();
                        var tt = $(this).children("title").text();
                        var ofs = childs.length;
                        childs.options[ofs] = new Option(tt, id);
                        if (parseInt(id) == parseInt(cid)) {
                            childs.options[ofs].selected = true;
                        }
                    });
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="br"></div>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <table style="width: 100%;" border="0" cellpadding="0" cellspacing="1" class="border">
            <tr class="suphead">
                <td colspan="7">
                    人员出差登记
                </td>
            </tr>
            <tr>
                <td width="90%" class="fields_text">
                    
                    <asp:Literal ID="Literal2" runat="server"></asp:Literal>
                    &nbsp;&nbsp;姓名:<asp:TextBox ID="tbUserName" runat="server"></asp:TextBox>
                    日期 从:
                    <asp:TextBox ID="tbStartDate" runat="server" CssClass="dates"></asp:TextBox>
&nbsp;&nbsp;到:
<asp:TextBox ID="tbEndDate" runat="server" CssClass="dates"></asp:TextBox>
<asp:Button ID="btnGo" runat="server" Text="查询" OnClick="btnGo_Click" /></td>
                <td width="10%" bgcolor="#F5F5F5"><a href="StaffGo_Add.aspx" class="btn">我要登计&gt;</a></td>   
            </tr>
        </table>

        <table cellpadding="0" cellspacing="1" border="0" width="100%">
<tr>
                <td class="topic"">
                    人员列表（今日<asp:Label ID="lbTime" runat="server"></asp:Label>)
                </td>
            </tr>            
        </table>
        <asp:ListView ID="lvList" runat="server" ItemPlaceholderID="items" OnItemCommand="lvList_ItemCommand" DataKeyNames="id">
            <LayoutTemplate>
                <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border">
                    <tr class="suphead">
                        <td>
                            人员姓名
                        </td>
                        <td>
                            开始时间
                        </td>
                        <td>
                            结束时间
                        </td>
                        <td>
                            去向信息
                        </td>
                        <td>
                            去向地点
                        </td>
                        <td>
                            联系方法
                        </td>
                        <td></td>
                    </tr>
                    <asp:PlaceHolder runat="server" ID="items"></asp:PlaceHolder>
                    </table>
            </LayoutTemplate>
            <ItemTemplate>
                <tr class="lines" ondblclick="window.open('StaffGo_Add.aspx?id= <%#Eval("id")%>', 'newwindow', 'height=600, width=800, top=100, left=400, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no')">
                    <td>
                        <%#Eval("UserName")%>
                    </td>
                     <td>
                        <%# Eval("StartDate")%>
                    </td>
                    <td>
                        <%#Eval("EndDate")%>
                    </td>                    
                    <td>
                        <%#Eval("Subject")%>
                    </td>      
                    <td>
                        <%# Eval("Content")%>
                    </td> 
                     <td>
                        <%# Eval("Contact")%>
                    </td>
                    <td>
                        <asp:LinkButton ID="LinkButton1" OnLoad="Delete_Load" runat="server" CommandName="deleteobj"
                            CommandArgument='<%# Eval("id") %>'>删除</asp:LinkButton>     
                    </td>              
                </tr>
            </ItemTemplate>
            <EmptyDataTemplate>
                <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border">
                    <tr class="suphead">
                        <td>
                            <h2>暂时没有数据</h2>
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
        </asp:ListView>

    <div class="pages">
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvList" PageSize="15">
                <Fields>
                    <asp:NextPreviousPagerField FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                        PreviousPageText="上一页" ShowFirstPageButton="True" ShowLastPageButton="True" />
                    <asp:NumericPagerField />
                </Fields>
            </asp:DataPager>
        </div>
    </form>
</body>
</html>

