<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Button_List.aspx.cs" Inherits="RM.Web.RMBase.SysMenu.Button_List" %>

<%@ Register Src="../../UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc1" %>
<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_Form_sz")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_Form_sz")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right;">
            <uc1:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        <table id="table1" class="grid" singleselect="true">
            <thead>
                <tr>
                    <td style="width: 20px; text-align: left;">
                        <label id="checkAllOff" onclick="CheckAllLine()" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Quanxuan")%>">
                            &nbsp;</label>
                    </td>
                    <td style="width: 35px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_ico")%>
                    </td>
                    <td style="width: 80px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_name")%>
                    </td>
                    <td style="width: 60px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_weihi")%>
                    </td>
                    <td style="width: 120px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_shiwu")%>
                    </td>
                    <td style="width: 50px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_Form_shunxu")%>
                    </td>
                    <td style="width: 120px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CreateUser")%>
                    </td>
                    <td style="width: 120px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_CreatDate")%>
                    </td>
                    <td style="width: 120px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ModifyUser")%>
                    </td>
                    <td style="width: 120px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ModifyTime")%>
                    </td>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Explain")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rp_Item" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td style="width: 20px; text-align: left;">
                                <input type="checkbox" value="<%#Eval("Button_ID")%>|<%#Eval("Button_Name")%>" name="checkbox" />
                            </td>
                            <td style="width: 35px; text-align: center;">
                                <img src='/Themes/images/16/<%#Eval("Button_Img")%>' style='width: 16px; height: 16px;
                                    vertical-align: middle;' alt='' />
                            </td>
                            <td style="width: 80px; text-align: center;">
                                <%#Eval("Button_Name")%>
                            </td>
                            <td style="width: 60px; text-align: center;">
                                <%#Eval("Button_Type")%>
                            </td>
                            <td style="width: 120px;">
                                <%#Eval("Button_Code")%>
                            </td>
                            <td style="width: 50px; text-align: center;">
                                <%#Eval("SortCode")%>
                            </td>
                            <td style="width: 120px; text-align: center;">
                                <%#Eval("CreateUserName")%>
                            </td>
                            <td style="width: 120px; text-align: center;">
                                <%#Eval("CreateDate", "{0:" + RM.Common.DotNetConfig.LanguageHelper.GetKey("DateTime") + "}")%>
                            </td>
                            <td style="width: 120px; text-align: center;">
                                <%#Eval("ModifyUserName")%>
                            </td>
                            <td style="width: 120px; text-align: center;">
                                <%#Eval("ModifyDate", "{0:" + RM.Common.DotNetConfig.LanguageHelper.GetKey("DateTime") + "}")%>
                            </td>
                            <td>
                                <%#Eval("Button_Remak")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <% if (rp_Item != null)
                           {
                               if (rp_Item.Items.Count == 0)
                               {
                                   Response.Write("<tr><td colspan='11' style='color:red;text-align:center'>" + RM.Common.DotNetConfig.LanguageHelper.GetKey("Null") + "</td></tr>");
                               }
                           } %>
                    </FooterTemplate>
                </asp:Repeater>
            </tbody>
        </table>
    </div>
    </form>
 <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            divresize(63);
            FixedTableHeader("#table1", $(window).height() - 91);
        })
        function add() {
            var url = "/RMBase/SysMenu/Button_Form.aspx";
            top.openDialog(url, 'Menu_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_xinxi") %>', 450, 325, 50, 50);
        }
        function edit() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var url = "/RMBase/SysMenu/Button_Form.aspx?key=" + key;
                top.openDialog(url, 'Menu_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_xinxi") %>', 450, 325, 50, 50);
            }
        }
        //删除
        function Delete() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var isExistparm = 'action=IsExist&tableName=Base_SysMenu&pkName=Menu_Name&pkVal=' + escape(arrt[1]);
                if (IsExist_Data('/Ajax/Common_Ajax.ashx', isExistparm) > 0) {
                    showWarningMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ass") %>');
                    return false;
                }
                var delparm = 'action=Virtualdelete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Button_List_btn") %>&tableName=Base_Button&pkName=Button_ID&pkVal=' + key;
                delConfig('/Ajax/Common_Ajax.ashx', delparm)
            }
        } 
    </script>
</body>
</html>
