<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserManger.aspx.cs" Inherits="WorkFlow.SystemPage.UserManger" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!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="../FlowPage/css/main.css" rel="stylesheet" type="text/css" />
    <link href="../FlowPage/css/ext-all.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="DirectMethod">
    </ext:ResourceManager>
    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
        <Items>
            <ext:Panel ID="PList" runat="server" Layout="Fit" Region="Center" Title="员工列表">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="Button5" runat="server" Text="设为系统用户" Icon="DriveUser" ToolTip="设为系统用户">
                                <Listeners>
                                    <Click Handler="DirectMethod.Add()" />
                                </Listeners>
                            </ext:Button>
                            <ext:ToolbarSeparator />
                            <ext:Button ID="Button1" runat="server" Text="取消系统用户" Icon="DriveDelete" ToolTip="取消系统用户">
                                <Listeners>
                                    <Click Handler="DirectMethod.Drop()" />
                                </Listeners>
                            </ext:Button>
                            <ext:ToolbarSeparator />
                            <ext:Button ID="Button2" runat="server" Text="密码重置" Icon="DriveKey" ToolTip="密码重置">
                                <Listeners>
                                    <Click Handler="DirectMethod.Reset()" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:GridPanel ID="GridPanel1" runat="server" Frame="true" StripeRows="true" AnimCollapse="false"
                        ClicksToEdit="1" Icon="Table" TrackMouseOver="true">
                        <TopBar>
                            <ext:Toolbar ID="Toolbar2" runat="server">
                                <Content>
                                    <table>
                                        <tr>
                                            <td>
                                                姓名：
                                            </td>
                                            <td>
                                                <ext:TextField ID="txtXMSearch" runat="server" Width="116" EnableKeyEvents="true">
                                                    <Listeners>
                                                        <KeyUp Handler="DirectMethod.XMSearch()" />
                                                    </Listeners>
                                                </ext:TextField>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                部门：
                                            </td>
                                            <td>
                                                <ext:ComboBox ID="cbBMSearch" runat="server" Width="116" ItemSelector="div.list-item"
                                                    DisplayField="Name" ValueField="Id" Editable="false">
                                                    <Store>
                                                        <ext:Store ID="SBMSearch" runat="server" SerializationMode="Complex">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:RecordField Name="Id" />
                                                                        <ext:RecordField Name="Name" />
                                                                    </Fields>
                                                                </ext:JsonReader>
                                                            </Reader>
                                                        </ext:Store>
                                                    </Store>
                                                    <Template ID="Template3" runat="server">
                                                        <Html>
                                                        <tpl for=".">
                                                       <div class="list-item">
								                          <h3>{Name}</h3>
								                       </div>				
					                                 </tpl>
                                                        </Html>
                                                    </Template>
                                                    <Listeners>
                                                        <Select Handler="DirectMethod.BMSearch()" />
                                                    </Listeners>
                                                </ext:ComboBox>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                职务：
                                            </td>
                                            <td>
                                                <ext:ComboBox ID="cbZWSearch" runat="server" Width="116" ItemSelector="div.list-item"
                                                    DisplayField="Name" ValueField="Id" Editable="false">
                                                    <Store>
                                                        <ext:Store ID="SZWSearch" runat="server" SerializationMode="Complex">
                                                            <Reader>
                                                                <ext:JsonReader IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:RecordField Name="Id" />
                                                                        <ext:RecordField Name="Name" />
                                                                    </Fields>
                                                                </ext:JsonReader>
                                                            </Reader>
                                                        </ext:Store>
                                                    </Store>
                                                    <Template ID="Template4" runat="server">
                                                        <Html>
                                                        <tpl for=".">
                                                       <div class="list-item">
								                          <h3>{Name}</h3>
								                       </div>				
					                                 </tpl>
                                                        </Html>
                                                    </Template>
                                                    <Listeners>
                                                        <Select Handler="DirectMethod.ZWSearch()" />
                                                    </Listeners>
                                                </ext:ComboBox>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ext:Toolbar>
                        </TopBar>
                        <Store>
                            <ext:Store ID="Store1" runat="server" OnRefreshData="Store1_RefreshData">
                                <Reader>
                                    <ext:JsonReader IDProperty="LoginAccount">
                                        <Fields>
                                            <ext:RecordField Name="LoginAccount" />
                                            <ext:RecordField Name="Name" />
                                            <ext:RecordField Name="XB" />
                                            <ext:RecordField Name="DepartmentName" />
                                            <ext:RecordField Name="PostionName" />
                                            <ext:RecordField Name="State" />
                                        </Fields>
                                    </ext:JsonReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <ColumnModel ID="ColumnModel2" runat="server">
                            <Columns>
                                <ext:Column Header="编号" DataIndex="LoginAccount" />
                                <ext:Column Header="姓名" DataIndex="Name" Width="60" />
                                <ext:Column Header="性别" DataIndex="XB" Width="40" />
                                <ext:Column Header="部门" DataIndex="DepartmentName" Width="80" />
                                <ext:Column Header="职务" DataIndex="PostionName" Width="80" />
                                <ext:Column Header="系统用户" DataIndex="State" Width="70" />
                            </Columns>
                        </ColumnModel>
                        <LoadMask ShowMask="true" />
                        <SelectionModel>
                            <ext:CheckboxSelectionModel ID="CheckboxSelectionModel2" runat="server" />
                        </SelectionModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="14" DisplayInfo="true"
                                BeforePageText="<span style='font-size:12px'>第</span>" AfterPageText="<span style='font-size:12px'>页</span>"
                                DisplayMsg="<span style='font-size:12px'>显示 {0} - {1}， 共 {2} 条</span>" EmptyMsg="<span style='font-size:12px'>无数据可以显示</span>"
                                Cls="fontsize" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
