<%@ page language="C#" autoeventwireup="true" inherits="admin_label_SelectColumn, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="NineRays.WebControls.FlyTreeView" Namespace="NineRays.WebControls"
    TagPrefix="NineRays" %>
<!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>
    <base target="_self"></base>
    <link id="CssName" rel="stylesheet" type="text/css" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="700" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td colspan="2" style="padding: 2px 2px 5px 3px">
                        <fieldset>
                            <legend>操作提示</legend>
                            <table cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td height="20">
                                    在左边选择需要筛选数据的栏目后，在右边设置该栏目所在模型中对应的字段名称.<br /><font color="red">在选中的栏目中，如果需要包含子栏目，则操作符必须选择：在(in)/不在(not in)</font>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td width="255" style="padding-left: 3px">
                        <fieldset>
                            <legend>选择栏目</legend>
                            <NineRays:FlyTreeView ID="ColTree" runat="server" ImageSet="Classic" Height="350"
                                Width="96%" Padding="3px" OnPopulateNodes="ColTree_PopulateNodes" Style="display: block"
                                EnableTheming="True" DragDropMode="CtrlDefinedMoveDefault" RootDropZoneHoverColor=""
                                SlideEffect="True" BackColor="245,245,245" DisplayBar="True" ExpandLevel="1">
                                <DefaultStyle Font-Names="Verdana" ForeColor="Black" ImageUrl="$none" Padding="0px;0px;0px;0px"
                                    RowHeight="16px" BorderStyle="NotSet" />
                                <SelectedStyle BackColor="65, 86, 122" BorderColor="40, 40, 40" BorderStyle="None"
                                    BorderWidth="0px" ForeColor="White" Padding="0px;0px;0px;0px" ImageUrl="$none" />
                                <HoverStyle Font-Underline="True" BorderStyle="None" />
                                <SelectedHoverStyle BorderStyle="None" />
                            </NineRays:FlyTreeView>
                        </fieldset>
                    </td>
                    <td width="440" valign="top" bgcolor="#f9f9f9" style="padding: 0px 2px 0px 5px">
                        <fieldset>
                            <legend>栏目关联</legend>
                            <div style="padding-right: 2px; overflow-y: auto; padding-left: 2px; scrollbar-face-color: #ffffff;
                                padding-bottom: 0px; scrollbar-highlight-color: #ffffff; overflow: auto; width: 100%;
                                scrollbar-shadow-color: #919192; color: blue; scrollbar-3dlight-color: #ffffff;
                                line-height: 100%; scrollbar-arrow-color: #919192; padding-top: 0px; scrollbar-track-color: #ffffff;
                                font-family: 宋体; scrollbar-darkshadow-color: #ffffff; letter-spacing: 1pt; height: 350px;
                                text-align: left">
                                <table cellpadding="0" cellspacing="1" width="100%" bgcolor="#9d9da1">
                                    <tr bgcolor="e0dfe3">
                                        <td height="22" align="center">
                                            ID
                                        </td>
                                        <td align="center">
                                            栏目名称
                                        </td>
                                        <td align="center">
                                            关联字段
                                        </td>
                                        <td align="center">操作符</td>
                                        <td align="center">连接符</td>
                                        <td align="center">包含子栏目</td>
                                    </tr>
                                    <asp:Repeater ID="Repeater1" runat="server" 
                                        onitemdatabound="Repeater1_ItemDataBound">
                                        <ItemTemplate>
                                            <tr bgcolor="f5f5f5">
                                                <td height="25">
                                                    <asp:Literal ID="Literal1" runat="server" Text='<%#Eval("Id") %>'></asp:Literal>
                                                </td>
                                                <td>
                                                    <%#Eval("CnName") %>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="DropField" runat="server">
                                                        <asp:ListItem Value="0">选择字段</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="DropDownList1" runat="server">
                                                        <asp:ListItem Value="=">等于</asp:ListItem>
                                                        <asp:ListItem Value="<>">不等于</asp:ListItem>
                                                        <asp:ListItem Value="in">在</asp:ListItem>
                                                        <asp:ListItem Value="not in">不在</asp:ListItem>
                                                        <asp:ListItem Value="like">象</asp:ListItem>
                                                        <asp:ListItem Value="not like">不象</asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
                                                <td><asp:DropDownList ID="DropDownList2" runat="server">
                                                        <asp:ListItem Value="and">and</asp:ListItem>
                                                        <asp:ListItem Value="or">or</asp:ListItem>
                                                    </asp:DropDownList></td>
                                                <td>
                                                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
                                                        <asp:ListItem Value="1">是</asp:ListItem>
                                                        <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </table>
                                </div>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" height="80" align="center" style="padding: 5px 2px 0px 3px">
                        <fieldset>
                            <legend>确认提交</legend>
                            <table>
                                <tr>
                                    <td height="50"><asp:Button ID="Button1" runat="server" style="background-color:White;border: 0px solid #ffffff;" Text="Button" OnClick="Button1_Click" Height="1px"
                                    Width="1px" />
                                        <asp:Button ID="Button2" runat="server" Text=" 确认提交 " CssClass="btn" 
                                            onclick="Button2_Click" /><input id="Button3"
                                            style="margin-left: 20px" type="button" value=" 取消 " onclick="window.close()"
                                            class="btn" />
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="Button2" />
            <asp:PostBackTrigger ControlID="Button1" />
        </Triggers>
    </asp:UpdatePanel>
    </form>
</body>
</html>

<script language="javascript">
    function tree_oncheck() {
        document.getElementById("Button1").click();
    }
</script>

