<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="smsTypeEdit.aspx.cs" Inherits="HySoft.BaseCallCenter.Web.smsmanage.smsTypeEdit" %>

<!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 href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script src="../scripts/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function validatelogin_name() {
            if ($("#txtName").val() == "") {
                document.getElementById("lbName").innerHTML = "* 不允许为空！";
                document.getElementById("lbName").style.color = "red";
                $.ligerDialog.error('名称不允许为空');
                return false;
            }
            else {
                document.getElementById("lbName").innerHTML = "*";
                document.getElementById("lbName").style.color = "#414141";
            }
            if ($("#txtContents").val() == "") {
                document.getElementById("lbContents").innerHTML = "* 不允许为空！";
                document.getElementById("lbContents").style.color = "red";
                $.ligerDialog.error('模板信息不允许为空');
                return false;
            }
            else {
                document.getElementById("lbContents").innerHTML = "*";
                document.getElementById("lbContents").style.color = "#414141";
                return true;
            }
        }
        function validate() {
            var i = 0;
            if (!validatelogin_name()) {
                i++;
            }
            if (i > 0) {
                return false;
            }
            return true;
        }

        function CloseThis() {
            var dialog = frameElement.dialog;
            parent.LoadList();
            dialog.close();
        }

        function SaveInfo(res) {
            switch (res) {
                case 'success':
                    $.ligerDialog.success('保存成功', function (yes) { CloseThis(); });
                    break;
                case 'warn':
                    $.ligerDialog.error('保存失败，请确认数据正确性');
                    break;
                case 'error':
                    $.ligerDialog.error('系统错误，请联系开发商');
                    break;
                default:
                    break;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="tab_con" style="display: block;">
            <table class="form_table">
                    <tr>
                        <th>
                            类型名称：
                        </th>
                        <td>
                            <asp:TextBox ID="txtName" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
                                id="lbName" for="txtName">*</label>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            模板信息：
                        </th>
                        <td>
                            <asp:TextBox ID="txtContents" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox><label
                                id="lbContents" for="txtContents">*</label>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            备注：
                        </th>
                        <td>
                            <asp:TextBox ID="txtRemark" runat="server" CssClass="txtInput normal" Style="width: 120px;"></asp:TextBox>
                        </td>
                    </tr>
            </table>
        </div>
        <div class="foot_btn_box">
            <asp:Button ID="btnSubmit" runat="server" Text="保&nbsp;&nbsp;存" CssClass="btnSubmit"
                OnClientClick="return validate();" OnClick="btnSubmit_Click" />
        </div>
    </form>
</body>
</html>
