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

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="form" style="width: 400px; 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="txtCategoryName" runat="server" CssClass="text"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="right">
                    上级分类：
                </td>
                <td>
                    <asp:DropDownList ID="ddlParentId" runat="server" DataTextField="CategoryName" DataValueField="CategoryId">
                        <asp:ListItem Value="0">-请选择-</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="right">
                    商品类型：
                </td>
                <td>
                    <asp:DropDownList ID="ddlTypeId" runat="server" DataTextField="CategoryName" DataValueField="CategoryId">
                        <asp:ListItem Value="0">-请选择-</asp:ListItem>
                    </asp:DropDownList>
                </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 = { '<%=txtCategoryName.UniqueID %>': { required: true} };
            messagesValue = { '<%=txtCategoryName.UniqueID %>': { required: "请输入分类名称"} }
            var form = jQuery.validator.ValidateForm($("#aspnetForm"), rulesValue, messagesValue);
            $("#btnSave").click(function () {
                if (form.form()) {
                    FormPostAjax("/crm/product/ProductCategoryEdit.aspx?op=Save&Id=<%=Id %>", "ok", CloseReload);
                }
                return false;
            })
        });
    </script>
</asp:Content>
