<%@ page language="C#" autoeventwireup="true" inherits="admin_iframe_ProgramList, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Import Namespace="D.BLL" %>
<%@ Import Namespace="D.Common" %>
<!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 id="CssName" rel="stylesheet" type="text/css" runat="server" />
    <script src="../../js/Common.js" type="text/javascript"></script>
    <script src="../../js/<%=B_Lang.getLang() %>/SelectCheckBox.js" type="text/javascript"></script>
    <script src="../../js/lhgdialog/lhgcore.lhgdialog.min.js?self=true&skin=<%=Function.GetCssNameColor()%>" type="text/javascript"></script>
    <script type="text/javascript">
        function SelectTemplate(obj, url) {
            var id = obj.id.split("_")[0] + "_" + obj.id.split("_")[1] + "_txtTemplate"
            WinOpenLhgDialog('选择风尚版模板', '' + url + '=' + id + '', 650, 450, '');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> 导航布局方案
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:GridView ID="GridView1" HeaderStyle-CssClass="title" runat="server" AutoGenerateColumns="False"
                CssClass="border" DataKeyNames="Id" RowStyle-CssClass="tdMoveTr" HorizontalAlign="Center"
                OnRowDataBound="GridView1_RowDataBound" OnRowCancelingEdit="GridView1_RowCancelingEdit"
                OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" 
                OnRowUpdating="GridView1_RowUpdating" Font-Bold="False" 
                onrowcommand="GridView1_RowCommand">
                <RowStyle CssClass="tdMoveTr" />
                <Columns>
                    <asp:TemplateField HeaderText="选择" ItemStyle-Width="30">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="ID">
                        <ItemTemplate>
                            <asp:Literal ID="LitId" runat="server" Text='<%#Eval("Id") %>'></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="方案名称">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Name") %>' CssClass="in1" Columns="10"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Literal runat="server" Text='<%# Bind("Name") %>' ID="Literal1"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="模板路径 ">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtTemplate" runat="server" Text='<%# Bind("Template") %>' CssClass="in1" style="float:left"></asp:TextBox><input id="Button4" type="button" value="选择模板" class="btn" runat="server" onclick="SelectTemplate(this,'../template/SelectTemplate.aspx?ControlId')" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Literal runat="server" Text='<%# Bind("Template") %>' ID="Literal5"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="排序">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("OrderId") %>' CssClass="in1" Columns="10"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("OrderId") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>  
                    <asp:TemplateField HeaderText="Aspx.cs">
                        <EditItemTemplate>
                            <asp:RadioButtonList ID="RadAspxcs" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Bind("aspxcs") %>'>
                            <asp:ListItem Value="0">系统默认</asp:ListItem>
                            <asp:ListItem Value="1">手动输入</asp:ListItem>
                        </asp:RadioButtonList>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# getAspxcs(Eval("aspxcs","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>  
                    <asp:TemplateField HeaderText="生成该方案" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Create" CommandArgument='<%# Eval("Id") %>'>生成整个方案</asp:LinkButton> ┊ 
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Top" CommandArgument='<%# Eval("Id") %>'>生成头部导航</asp:LinkButton> ┊ 
                            <asp:LinkButton ID="LinkButton3" runat="server" CommandName="fashion" CommandArgument='<%# Eval("Id") %>'>生成风尚版</asp:LinkButton> ┊ 
                                <asp:Literal ID="LitAspxcs" runat="server"></asp:Literal>  ┊ <asp:LinkButton ID="LinkButton5" runat="server" CommandName="copy" CommandArgument='<%# Eval("Id") %>'>复制</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowEditButton="True" HeaderText="编辑" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                    <asp:CommandField ShowDeleteButton="True" HeaderText="删除" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" />
                </Columns>
                <HeaderStyle CssClass="title" Font-Bold="True" />
                <EmptyDataTemplate>
                        <tr class="title">
                            <td>ID
                            </td>
                            <td>方案名称
                            </td>
                            <td>模板
                            </td>
                            <td>排序
                            </td>
                            <td>编辑
                            </td>
                            <td>删除
                            </td>
                        </tr>
                </EmptyDataTemplate>
            </asp:GridView>
            <table cellpadding="0" cellspacing="1" class="dh2" align="center">
                <tr>
                    <td height="30"><input id="checkDel" onclick="CheckDelBox(this)"
                                type="checkbox"><span id="ShowA">选择全部</span>
                        <asp:Button ID="Button2" runat="server" Text="生成选中整个方案" CssClass="btn" 
                            style="margin-left:10px" onclick="Button2_Click"></asp:Button>
                        <asp:Button ID="Button3" runat="server" Text="生成选中头部导航" CssClass="btn" 
                            style="margin-left:10px" onclick="Button3_Click"></asp:Button>
                    </td>
                </tr>
            </table>
            <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center" style="margin-top:5px">
                <tr>
                    <td class="bqleft">
                        方案名称：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtName" runat="server" CssClass="in1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        使用模板：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtTemplate" runat="server" CssClass="in1" Columns="40" style="float:left;"></asp:TextBox><input id="Button4" type="button" value="选择模板" class="btn" onclick="WinOpenLhgDialog('选择风尚版模板', '../template/SelectTemplate.aspx?ControlId=txtTemplate', 650, 450, '')" /> 针对风尚版时使用
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        排序值：
                    </td>
                    <td class="bqright">
                        <asp:TextBox ID="txtOrderId" runat="server" CssClass="in1" Text="1"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                        生成头部Aspx.cs方式：
                    </td>
                    <td class="bqright">
                        <asp:RadioButtonList ID="RadAspxcs" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0" Selected="True">系统默认</asp:ListItem>
                            <asp:ListItem Value="1">手动输入</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="bqleft">
                    </td>
                    <td class="bqright" height="40">
                        <asp:Button ID="Button1" runat="server" CssClass="btn radius30 pad_0_30" Text=" 确认 " OnClick="Button1_Click" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
