<%
    //-----------------------------------------------------------
    // 文件名称: Tool_Department_Manage.aspx
    // 页面名称: 部门管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-02
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Tool_Department_Manage, V5Shop.Shop.Tool" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<!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="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px; border-bottom: #f7f7f7 4px solid">
                    &nbsp;<asp:Label ID="lblShortName" runat="server" Text="部门简称" meta:resourcekey="lblShortNameResource1"></asp:Label>
                    <asp:TextBox ID="txtShortName" runat="server" Width="100px" meta:resourcekey="txtShortNameResource1"></asp:TextBox>
                    <asp:Label ID="lblIsDel" runat="server" Text="状态" meta:resourcekey="lblIsDelResource1"></asp:Label>
                    &nbsp;<asp:DropDownList ID="ddlIsDel" runat="server" meta:resourcekey="ddlIsDelResource1">
                        <asp:ListItem Value="2">全部</asp:ListItem>
                        <asp:ListItem Value="0">未删除</asp:ListItem>
                        <asp:ListItem Value="1">已删除</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource1" CssClass="button" />&nbsp;
                </div>
            </div>
            <!-- 明细数据编辑栏 -->
            <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />
                全选
                <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click" CausesValidation="False"><img src="images/icon/key_add.gif"/> 添加</asp:LinkButton>
                <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" /> 编辑</asp:LinkButton>
                <asp:LinkButton ID="btnDelStatus" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDelStatus_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" /> 删除</asp:LinkButton>
                <asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_cdelete.gif" /> 彻底删除</asp:LinkButton></div>
            <div class="listborder">
                <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="12" HeaderStyle-ForeColor="#000000">
                    <PagerSettings Mode="NumericFirstLast" />
                    <Columns>
                        <asp:TemplateField meta:resourcekey="TemplateFieldResource1" ItemStyle-Width="5%">
                            <itemtemplate>
                                <input runat="server" Value='<%# Eval("ID") %>' ID="CheckBoxID" type="checkbox" class="checkbox"
                                    onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" />
                            </itemtemplate>
                            <itemstyle horizontalalign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="10%" />
                        <asp:BoundField HeaderText="部门全名称" DataField="Name" SortExpression="Name" ItemStyle-Width="30%" />
                        <asp:BoundField HeaderText="部门简称" DataField="ShortName" SortExpression="ShortName" ItemStyle-Width="15%" />
                        <asp:BoundField HeaderText="创建人" DataField="Creator" SortExpression="Creator" ItemStyle-Width="15%" />
                        <asp:BoundField HeaderText="创建时间" DataField="CreateDate" SortExpression="CreateDate" ItemStyle-Width="15%" />
                        <asp:TemplateField HeaderText="状态" SortExpression="IsDel" ItemStyle-Width="10%">
                            <itemtemplate>
                                <asp:Label runat="server" Text='<%# FormartStatus(DataBinder.Eval(Container,"DataItem(IsDel)","{0}")) %>'> id="Label1"></asp:Label>
                            </itemtemplate>
                            <itemstyle horizontalalign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="category" />
                </cc1:V5ShopGridView>
            </div>
            <asp:Panel runat="server" ID="PanelShow" Visible="False" Width="100%">
                <div align="center" style="background: #f1f1f1">
                    <table cellpadding="0" cellspacing="0" width="500">
                        <tr>
                            <td align="right" height="30" width="20%">
                                <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="部门全称" HideSelects="False" ImageURL="images/help.gif" Text='部门的全名称,如"上海威博网络科技有限公司"。' />
                                <asp:Label ID="lblName" runat="server" Text="部门全称：">
                                </asp:Label>
                            </td>
                            <td align="left" style="width: 400px">
                                <asp:TextBox ID="txtName" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="不能为空">
                                </asp:RequiredFieldValidator>
                                <span class="NeedMsg">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="30" width="20%">
                                <cc1:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="部门简称" HideSelects="False" ImageURL="images/help.gif" Text='对部门名称的一个简短说明和标识,如"上海威博"或"Web08"。' />
                                <asp:Label ID="LabelShortName" runat="server" Text="部门简称：">
                                </asp:Label>
                            </td>
                            <td align="left" style="width: 400px">
                                <asp:TextBox ID="txtShortNameAdd" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtShortNameAdd" Display="Dynamic" ErrorMessage="不能为空">
                                </asp:RequiredFieldValidator>
                                <span class="NeedMsg">*</span></td>
                        </tr>
                        <tr>
                            <td style="width: 500px; height: 21px;" colspan="2" align="center">
                                <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />
                                <asp:Button ID="btnEditSubmit" runat="server" meta:resourcekey="btnEditResource1" OnClick="btnEditSubmit_Click" Text="更新" Visible="False" CssClass="button" />&nbsp;
                                <input id="iptReset" runat="server" type="reset" value="重置" class="button" /></td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
        </div>
        <uc2:PageBottom ID="PageBottom1" runat="server" />
        <div id="hiddenfield">
            <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
            <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
            <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
            <uc1:HiddenField ID="Alert" runat="server" />
        </div>
    </form>
</body>
</html>
