<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sys_SendEvent.aspx.cs"
    Inherits="MTCUN.Mobile.SMS.sys_SendEvent" Title="短信事件-消息" %>

<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc3" %>
<%@ 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="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <uc3:col_Header ID="col_Header1" runat="server" />
        <div id="web_page_contents">

            <div class="biao_zhun_suo_jin">

                <div class="main">


                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                        DataKeyNames="SendEventID" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
                        OnRowUpdating="GridView1_RowUpdating" OnRowDataBound="GridView1_RowDataBound">
                        <Columns>
                            <asp:BoundField DataField="SendEventID" HeaderText="事件编号" ReadOnly="true" />
                            <asp:BoundField DataField="SendEventName" HeaderText="事件名称" />
                            <asp:TemplateField HeaderText="发送短信">
                                <ItemTemplate>
                                    <%# Rs.Items.GetYN((int)Eval("LockState"))%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList runat="server" ID="ddlLockState" SelectedIndex='<%# Eval("LockState") %>'>
                                        <asp:ListItem Value="0" Text="否"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="是"></asp:ListItem>
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="短信内容">
                                <ItemTemplate>
                                    <asp:Label ID="labContent" runat="server" Text='<%# Eval("Content") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <div id="msg2" style="color: #676767">
                                    </div>
                                    <asp:TextBox ID="tbxContent" runat="server" Text='<%# Eval("Content") %>' TextMode="MultiLine"
                                        Height="100px" Width="180px"></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="DelayMinute" HeaderText="延时发送（分钟）" />
                            <asp:CommandField HeaderText="编辑" EditText="编辑" CancelText="取消" UpdateText="更新" ShowEditButton="true" />
                        </Columns>
                    </asp:GridView>


                    <asp:Repeater ID="repBlock" runat="server" OnItemCommand="repBlock_ItemCommand" OnItemDataBound="repBlock_ItemDataBound">
                        <ItemTemplate>

                            <asp:Panel ID="plItem" runat="server" CssClass="kuai">
                                <h1 class="auto_length_title">
                                    <asp:Label ID="labSendEventName" runat="server" Text='<%# Eval("SendEventName")%>'></asp:Label>
                                </h1>
                                <table class="table_simple_kuan" cellspacing="0" border="0">
                                    <tr>
                                        <td style="width: 50px">发送：</td>
                                        <td style="width: auto"><%# Rs.Items.GetYN((int)Eval("LockState"))%></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">内容：</td>
                                        <td style="width: auto"><%# Eval("Content") %></td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnEdit" CommandArgument='<%# Eval("SendEventID")%>'
                                                    CommandName="Edit" Text="编辑"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>

                            <asp:Panel ID="plEdit" runat="server" CssClass="kuai edit_kuai">
                                <h1 class="auto_length_title">
                                    <asp:Label ID="lab" runat="server" Text='<%# Eval("SendEventName")%>'></asp:Label>
                                </h1>
                                <table class="table_simple_kuan" cellspacing="0" border="0">
                                    <tr>
                                        <td style="width: 50px">发送：</td>
                                        <td style="width: auto">
                                            <asp:DropDownList runat="server" ID="ddlLockState" SelectedIndex='<%# Eval("LockState") %>'>
                                                <asp:ListItem Value="0" Text="否"></asp:ListItem>
                                                <asp:ListItem Value="1" Text="是"></asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">内容：</td>
                                        <td style="width: auto">
                                            <div id="msg2" style="color: #676767">
                                            </div>
                                            <asp:TextBox ID="tbxContent" runat="server" Text='<%# Eval("Content") %>' TextMode="MultiLine"
                                                Height="100px" Width="180px"></asp:TextBox></td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnUpdate" CommandArgument='<%# Eval("SendEventID")%>'
                                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                            </div>
                                        </td>
                                        <td>
                                            <div class="lab_button">
                                                <asp:LinkButton runat="server" ID="lbnCancel" CommandArgument='<%# Eval("SendEventID")%>'
                                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>

                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="divpanel">
                    <b>注意事项：</b><br />
                    1、所有事件内容中都支持如下变量：<b>{学号}{姓名}{手机}{日期时间}{日期}{时间}</b>。<br />
                    2、事件1、事件2，同时支持如下变量：<b>{班号}{班级名称}{讲师}{上课时间}{上课教室}{考勤状态}{课时提醒}</b>。<br />
                    3、事件4，同时支持如下变量：<b>{班号}{班级名称}{讲师}{开班日期}{上课规律}{上课教室}{上课校区}</b>。<br />
                    4、事件5，同时支持如下变量：<b>{单号}{付款方式}{类型}{金额}</b>。<br />
                    5、事件6，同时支持如下变量：<b>{单号}{应扣金额}{优惠金额}{实扣金额}</b><br />
                </div>
            </div>
        </div>
    </form>
</body>
</html>
