<%@ Page Language="c#" CodeBehind="SendToUser.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.User.Sms_SendToUser"
    ValidateRequest="false" Title="短信发送给员工-短信" %>

<%@ Import Namespace="MTCUN" %>
<!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">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
    <script type="text/javascript">
        var h = 36;
        function AddHeight(num) {
            var div = document.getElementById("tbxTargetNos");
            if (num < 0 && h < 36) {

            } else {
                h += num;
            }

            if (h > 0) {
                div.style.height = h + "px";
            }

            document.getElementById("codeboxheight").value = h;
        }
    </script>
</head>
<body>
    <form id="FormPost" method="post" runat="server">
    <div class="divpanel">
        <table class="table" style="width: 623px; margin-left: auto; margin-right: auto"
            border="0" cellspacing="0">
            <tr>
                <th colspan="2">
                    发送短信到员工
                </th>
            </tr>
            <tr>
                <td style="width: 69px; height: 60px">
                    发送给：
                </td>
                <td style="height: 60px; width: 510px;">
                    <asp:ListBox ID="lbxUsers" runat="server" SelectionMode="Multiple" DataTextField="TrueName"
                        DataValueField="UserID" Height="136px" Width="157px"></asp:ListBox>
                    <span style="color: Red">*</span> 按住Ctrl键可多选。
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    抄送：
                </td>
                <td style="width: 510px">
                    <label class="lab_button">
                        <input id="btnAddHeight" type="button" value="+" title="加高编辑器" onclick="AddHeight(100);" /></label>
                    <label class="lab_button">
                        <input id="btnClearHeight" type="button" value="-" title="减高编辑器" onclick="AddHeight(-100);" /></label>
                    <br />
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <asp:TextBox ID="tbxTargetNos" runat="server" Width="291px" Height="36px" TextMode="MultiLine"></asp:TextBox>
                            </td>
                            <td style="line-height: 100%; padding: 2px">
                                直接输入手机号，多个请使用逗号或分号隔开，也可以一行一个手机号。
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    短信内容：
                </td>
                <td style="width: 510px">
                    <div id="msg" style="color: #676767">
                    </div>
                    <asp:TextBox runat="server" Width="156px" MaxLength="70" ID="tbxContent" Height="110px"
                        TextMode="MultiLine"></asp:TextBox>
                    <span style="color: #ff0000">*</span>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    类别：
                </td>
                <td style="width: 510px">
                    <asp:DropDownList ID="ddlUserLevel" runat="server">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                        <asp:ListItem Value="1">通知</asp:ListItem>
                        <asp:ListItem Value="2">广告</asp:ListItem>
                    </asp:DropDownList>
                    <span style="color: #ff0000">*</span>
                    <asp:CompareValidator ID="_ddlUserLevel" runat="server" ControlToValidate="ddlUserLevel"
                        ErrorMessage="请选择类别！" Operator="NotEqual" ValueToCompare="0"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    选择模板：
                </td>
                <td style="width: 510px">
                    <asp:DropDownList ID="ddlSmsTemplate" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSmsTemplate_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    发送通道：
                </td>
                <td style="width: 510px">
                    <asp:DropDownList ID="ddlGangway" runat="server">
                        <asp:ListItem Value="1">短信+App</asp:ListItem>
                        <asp:ListItem Value="2">短信</asp:ListItem>
                        <asp:ListItem Value="3">App</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                    发送时间：
                </td>
                <td style="width: 510px">
                    <asp:TextBox ID="tbxDateAndTime" runat="server" Width="201px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="width: 69px">
                </td>
                <td style="width: 510px">
                    <label class="lab_button">
                        <asp:Button ID="btnGoto" runat="server" Text="发送" OnClick="btnGoto_Click"></asp:Button>
                    </label>
                    <label class="lab_button" id="__mt_labBack" runat="server">
                        <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
                    </label>
                </td>
            </tr>
        </table>
    </div>
    <input id="codeboxheight" name="codeboxheight" type="hidden" value="300" />
    </form>
    <div class="divpanel">
        <b>注意事项：</b><br />
        1、短信内容中支持如下变量：<b>{工号}{姓名}{手机}{日期时间}{日期}{时间}</b>。<br />
    </div>
</body>
</html>
