<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="ModuleList.aspx.cs" Inherits="OAWeb.Sys.ModuleList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlace" runat="server">
    <style type="text/css">
        .table_list th, .table_list td
        {
            text-align: left;
        }
    </style>
    <!--主体-->
    <div class="page_main">
        <div class="page_content">
            <table class="data_title" cellspacing="3">
                <tr>
                    <td class="data_caption">
                        功能管理
                    </td>
                </tr>
            </table>
            <div class="page_op">
                <asp:Button ID="btnNewUser" runat="server" Text="新增功能" CssClass="btn_77px" OnClientClick="return OpenDialog('/Sys/ModuleEdit.aspx','新增功能');" />
            </div>
            <div class="list">
                <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="False" DataKeyNames="Id"
                    GridLines="None" OnRowDataBound="gvData_RowDataBound" CellPadding="0" CssClass="table_list"
                    EnableModelValidation="True">
                    <RowStyle HorizontalAlign="Left" />
                    <Columns>
                        <asp:BoundField DataField="FullName" HeaderText="菜单">
                            <HeaderStyle HorizontalAlign="Left" />
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:BoundField DataField="NavigateUrl" HeaderText="地址"></asp:BoundField>
                        <asp:TemplateField HeaderText="是否有效">
                            <ItemTemplate>
                                <img class='<%#Eval("Enabled").ToString() == "0" ? "ico02" : "ico01"%>' src="/images/transparent.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="显示在工作台">
                            <ItemTemplate>
                                <img class='<%#Eval("IsWork").ToString() == "0" ? "ico02" : "ico01"%>' src="/images/transparent.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否系统">
                            <ItemTemplate>
                                <img class='<%#Eval("IsSys").ToString() == "0" ? "ico02" : "ico01"%>' src="/images/transparent.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否菜单">
                            <ItemTemplate>
                                <img class='<%#Eval("IsMenu").ToString() == "0" ? "ico02" : "ico01"%>' src="/images/transparent.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="SortCode" HeaderText="排序"></asp:BoundField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnEdit" runat="server">编辑</asp:LinkButton>
                                <asp:LinkButton ID="lbtnDelete" runat="server">删除</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".tr01").click(function () {
                var item = $(".table_list").find($(this).attr("value"));
                if (item.is(":hidden")) {
                    item.show();
                }
                else {
                    item.hide();
                }
            })
        });
    </script>
</asp:Content>
