<%@ Page Language="c#" CodeBehind="PostSearch.aspx.cs" AutoEventWireup="True" Inherits="SWTraining.Search.PostSearch"
    Title="行政管理-Sql查询编辑" %>

<%@ Import Namespace="SWTraining" %>
<%@ Register Src="../UserCol/CodeBox.ascx" TagName="CodeBox" 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">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />

    <script language="javascript" type="text/javascript">
        function checkIssueType(source, args) {
            var chkListaTipoModificaciones = document.getElementById('cblSetGroup');
            var chkLista = chkListaTipoModificaciones.getElementsByTagName("input");
            for (var i = 0; i < chkLista.length; i++) {
                if (chkLista[i].checked) {
                    args.IsValid = true;
                    return;
                }
            }
            args.IsValid = false;
        }
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div id="sw_content">
        <div class="divpanel" style="margin-bottom: 120px">
            <table class="table" cellspacing="0">
                <tr>
                    <th colspan="2">
                        ＳＱＬ语句编辑
                    </th>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        标题：
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="tbxSearchName" Width="288px"></asp:TextBox>
                        <span style="color: Red">*</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        主查询：
                    </td>
                    <td style="vertical-align: baseline">
                        <div style="float: left; width: 65%">
                            <uc1:CodeBox ID="tbxContent" runat="server" Width="100%" Height="220px" />
                        </div>
                        <div style="float: left">
                            <span style="color: Red; margin-left: 10px">*</span></div>
                        <div style="clear: both">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        子查询：
                    </td>
                    <td>
                        <uc1:CodeBox ID="tbxShowContent" runat="server" Width="65%" Height="150px" />
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        访问权限：
                    </td>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    已选用户/组<asp:DropDownList ID="ddlAllow" runat="server">
                                        <asp:ListItem Value="0">禁止访问</asp:ListItem>
                                        <asp:ListItem Value="1">允许访问</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlGroupAndUsers" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlGroupAndUsers_SelectedIndexChanged">
                                        <asp:ListItem Value="0">所有用户组</asp:ListItem>
                                        <asp:ListItem Value="1">所有用户</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:ListBox ID="lbxSelected" runat="server" Height="129px" Width="150px" SelectionMode="Multiple">
                                    </asp:ListBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnAdd" runat="server" Text="&lt;加入" OnClick="btnAdd_Click" />
                                    <br />
                                    <br />
                                    <asp:Button ID="btnClear" runat="server" Text="移除&gt;" OnClick="btnClear_Click" />
                                </td>
                                <td>
                                    <asp:ListBox ID="lbxGroupAndUsers" runat="server" Height="129px" Width="150px" SelectionMode="Multiple">
                                    </asp:ListBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        出现位置：
                    </td>
                    <td>
                    <ul style="padding:0px; margin:0px">
                        <li style="list-style-type: none; float: left">
                            <asp:CheckBoxList ID="cblSetGroup" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Value="1">咨询报名</asp:ListItem>
                                <asp:ListItem Value="2">老师工作台</asp:ListItem>
                                <asp:ListItem Value="3">教务管理</asp:ListItem>
                                <asp:ListItem Value="4">财务管理</asp:ListItem>
                                <asp:ListItem Value="5">仓库管理</asp:ListItem>
                                <asp:ListItem Value="6">人事管理</asp:ListItem>
                                <asp:ListItem Value="7">行政管理</asp:ListItem>
                                <asp:ListItem Value="10">系统设置</asp:ListItem>
                            </asp:CheckBoxList>
                        </li>
                        <li style="list-style-type: none; float: left">
                            <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="checkIssueType"
                                Display="Dynamic" ErrorMessage="*请选择出现位置（至少选择一个）！"></asp:CustomValidator></li>
                        <li style="list-style-type: none; clear: both"></li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        状态：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="rblLockState" runat="server" Width="120px" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0" Text="禁用"></asp:ListItem>
                            <asp:ListItem Value="1" Text="启用"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                        备注：
                    </td>
                    <td>
                        <asp:TextBox ID="tbxRemark" runat="server" Width="448px" TextMode="MultiLine" Height="60px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 83px">
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" OnClick="btnSubmit_Click"></asp:Button>&nbsp;<input
                            causesvalidation="false" type="button" runat="server" onclick="back()" value="返回" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
