<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Member_From.aspx.cs" Inherits="RM.Web.Member.Member_From" %>
<%@ Register Src="/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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>
<title>会员表单</title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" action="Member_From.aspx"  method="post">
    <div class="btnbartitle">
        <div>会员资料</div>
    </div>
     <div class="btnbarcontetn">
        <div style="text-align: right;">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        
        <input type="hidden" id="wh" name="wh" value="" /><!--主键参数,修改时用-->
        <div id="loading" class="loading" style=" display:none;"><img src="/Themes/Images/loading1.gif" /> 正在查询,请稍后...</div>
        <%=myform %>
    </div>
    </form>
<script src="/Themes/Scripts/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/Themes/Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="/Themes/Scripts/Validate.js" type="text/javascript"></script>
<script type="text/javascript">
        $(document).ready(function() {
        try {//排序
                <%=formajax %>
            }
            catch (e) { alert(e);}
        });
        function yanzheng() {
            //第一验证必填项是否全添了
            var b = true;
            var bitian = $(".bitian");
            $('.bitian').each(function() {
                if ($(this).val() == "") {
                    $(this).addClass('errcss');
                    alert("请填写全部加 * 号的内容");
                    b = false;
                    return false;
                }
                else {
                    $(this).removeClass('errcss');
                }
            });
            //第二验证数据类型是否正确
            $('.datetime').each(function() { //验证时间格式
                if ($(this).val() != "") {
                    if (!isDate($(this).val(), "yyyy-MM-dd")) {
                        $(this).addClass('errcss');
                        alert("请输入时间格式，如2012-12-12");
                        b = false;
                        return false;
                    }
                }
            });
            $('.int').each(function() { //验证正整数
                if ($(this).val() != "") {
                    if (!isInteger($(this).val())) {
                        $(this).addClass('errcss');
                        alert("请输入正整数");
                        b = false;
                        return false;
                    }
                }
            });
            return b;
        }
        //新增
        function add(){
            document.forms["form1"].reset(); //表单重置
            document.getElementById("aud").value = "A";
        }
        //保存
        function SaveForm(){
             if (yanzheng()) {
                    document.forms["form1"].submit();
                }
        }
        //编辑
        function GetInput(strwhere) {
            document.getElementById("loading").style.display = "block";
            document.forms["form1"].reset(); //表单重置
            document.getElementById("aud").value = "U";
            document.getElementById("wh").value = strwhere;
            $.getScript("/Ajax/GetForm.ashx?w=" + strwhere,
            function() {
                 document.getElementById("loading").style.display = "none";
            });
        }
        function set() {
         var url = "/RMBase/SysWindows/Base_WindowsStyleForm.aspx?key=<%=windowsname %>";
         top.openDialog(url, 'Reminder_Form', '会员属性 - 显示设置', 750, 400, 50, 50);
         //window.location = url;
     }
    </script>
</body>
</html>
