<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog/DialogMaster.Master" AutoEventWireup="true"
    CodeBehind="ShippingEdit.aspx.cs" Inherits="OAWeb.Sys.ShippingEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="form" style="width: 600px; padding: 10px;">
        <table cellpadding="0" cellspacing="0" border="0" class="table_form">
            <tr>
                <td class="right">
                    <span class="red">*</span> 配送方式：
                </td>
                <td>
                    <asp:TextBox ID="txtShippingName" runat="server" CssClass="text width200"></asp:TextBox>
                    <asp:CheckBox ID="chkState" runat="server" Text="启用" Checked="True" />
                </td>
            </tr>
            <tr>
                <td class="right">
                    配送费用：
                </td>
                <td>
                    <asp:TextBox ID="txtFreight" runat="server" CssClass="text width40" Text="0"></asp:TextBox> 排序号：<asp:TextBox ID="txtSortCode" runat="server" CssClass="text width40" Text="0"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
                <td class="right">
                    描述：
                </td>
                <td>
                    <asp:TextBox ID="txtRemark" runat="server" CssClass="text" Width="99%" Height="75px"
                        TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input id="btnSave" type="button" value=" 保 存 " class="btn_77px" />
                    <input id="btnClose" type="button" value=" 返 回 " onclick="art.dialog.close();return false;"
                        class="btn_77px" />
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            rulesValue = { '<%=txtShippingName.UniqueID %>': { required: true }, '<%=txtFreight.UniqueID %>': { number: true }, '<%=txtSortCode.UniqueID %>': { digits: true} };
            messagesValue = { '<%=txtShippingName.UniqueID %>': { required: "请输入配送方式" }, '<%=txtFreight.UniqueID %>': { number: "只允许填写数字金额" }, '<%=txtSortCode.UniqueID %>': { digits: "排序号必须为正整数"} }
            var form = jQuery.validator.ValidateForm($("#aspnetForm"), rulesValue, messagesValue);
            $("#btnSave").click(function () {
                if (form.form()) {
                    $("#aspnetForm").ajaxSubmit({
                        url: "/Sys/ShippingEdit.aspx?op=Save&Id=<%=Id %>",
                        success: function (result) {
                            if (result == "ok") {
                                alert("保存成功");
                                CloseReload();
                            } else {
                                alert(result);
                            }
                        }
                    });
                }
                return false;
            })
        });
    </script>
</asp:Content>
