<div class="main">
    <div class="tabcontent" data-tab-params="tabName:'基本资料'">
        <form method="post" id="_form" class="form-horizontal form  form-control-sm ui-validForm" data-custom-params="beforeSubmit:'BeforeSubmit'" data-source="@ViewBag.MemberData">
            @{
                string beforeSubmitJs = "";
                var data = new ViewDataDictionary();
                data.Add("from", "member");
                data.Add("currentUser", ViewBag.CurrentUser);
                data.Add("i", 0);
                IEnumerable<dynamic> FieldData = ViewBag.FieldData;
                int i = 0;
                if (FieldData != null)
                {
                    foreach (var row in FieldData)
                    {
                        data["i"] = i;
                        beforeSubmitJs += row.BeforeSubmitJs;
                        Html.RenderPartial("~/Areas/E/Views/CustomForm/FormPartial.cshtml", (object)row, data);
                        i++;
                    }
                }

            }
            <script type="text/javascript">
                function BeforeSubmit() {
                    @beforeSubmitJs
                    return true;
                }
            </script>

            <div class="postarea">
                <div class="control-group">
                    <div class="controls">
                        @Html.AntiForgeryToken()
                        <input type="hidden" id="Id" name="Id" value="0" />
                        <input type="hidden" id="Guid" name="Guid" value="@ViewBag.Guid" />
                        <input type="hidden" id="State" name="State" value="1" />
                        <input type="hidden" id="IsAdmin" name="IsAdmin" value="0" />
                        <input type="hidden" id="Logins" name="Logins" value="0" />
                        <input type="hidden" id="Password" name="Password" value="" />
                        <input type="hidden" id="MemberGroupId" name="MemberGroupId" value="0" />
                        <input type="hidden" id="DepartmentId" name="DepartmentId" value="0" />
                        <input type="hidden" name="Email" id="Email" value="">
                        <input type="hidden" name="Mobile" id="Mobile" value="">
                        <input type="hidden" id="Username" name="Username" />
                        <button type="button" class="btn btn-primary btn-sm ui-pagePost" data-custom-params="url:'@Url.Action("Edit")'">提交</button>
                    </div>
                </div>
            </div>
        </form>
        </div>
    <div class="tabcontent" data-tab-params="tabName:'邮箱绑定'">
        <form method="post" id="_form" class="form-horizontal form  form-control-sm ui-validForm" data-custom-params="beforeSubmit:'BeforeSubmit'" data-source="@ViewBag.MemberData">

            <div class="control-group">
                <label class="control-label">旧密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="oldPassword" id="oldPassword" data-validate="dataType:'*',nullMsg:'请填旧密码!',errorMsg:''" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label">新密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="newPassword" " id="newPassword" data-validate="dataType:'password',nullMsg:'请填写新密码!',errorMsg:''" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label">新确认密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="password1" data-validate="dataType:'*',nullMsg:'请填写确认密码!',errorMsg:'两次密码输入不一致!',compare:'#newPassword'" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="postarea">
                <div class="control-group">
                    <div class="controls">
                        @Html.AntiForgeryToken()
                        <button type="button" class="btn btn-primary btn-sm ui-pagePost" data-custom-params="url:'@Url.Action("ModifyPassword")'">提交</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="tabcontent" data-tab-params="tabName:'手机绑定'">
        <form method="post" id="_form" class="form-horizontal form  form-control-sm ui-validForm" data-custom-params="beforeSubmit:'BeforeSubmit'" data-source="@ViewBag.MemberData">

            <div class="control-group">
                <label class="control-label">旧密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="oldPassword" id="oldPassword" data-validate="dataType:'*',nullMsg:'请填旧密码!',errorMsg:''" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label">新密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="newPassword" " id="newPassword" data-validate="dataType:'password',nullMsg:'请填写新密码!',errorMsg:''" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label">新确认密码：</label>
                <div class="controls form-inline">
                    <input type="password" class="form-control" name="password1" data-validate="dataType:'*',nullMsg:'请填写确认密码!',errorMsg:'两次密码输入不一致!',compare:'#newPassword'" maxlength="16">
                    <span class="help-block"></span>
                </div>
            </div>

            <div class="postarea">
                <div class="control-group">
                    <div class="controls">
                        @Html.AntiForgeryToken()
                        <button type="button" class="btn btn-primary btn-sm ui-pagePost" data-custom-params="url:'@Url.Action("ModifyPassword")'">提交</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
       <div class="tabcontent" data-tab-params="tabName:'密码修改'">
           <form method="post" id="_form" class="form-horizontal form  form-control-sm ui-validForm" data-custom-params="beforeSubmit:'BeforeSubmit'" data-source="@ViewBag.MemberData">

               <div class="control-group">
                   <label class="control-label">旧密码：</label>
                   <div class="controls form-inline">
                       <input type="password" class="form-control" name="oldPassword" id="oldPassword" data-validate="dataType:'*',nullMsg:'请填旧密码!',errorMsg:''" maxlength="16">
                       <span class="help-block"></span>
                   </div>
               </div>

               <div class="control-group">
                   <label class="control-label">新密码：</label>
                   <div class="controls form-inline">
                       <input type="password" class="form-control" name="newPassword"" id="newPassword" data-validate="dataType:'password',nullMsg:'请填写新密码!',errorMsg:''" maxlength="16">
                       <span class="help-block"></span>
                   </div>
               </div>

               <div class="control-group">
                   <label class="control-label">新确认密码：</label>
                   <div class="controls form-inline">
                       <input type="password" class="form-control" name="password1"  data-validate="dataType:'*',nullMsg:'请填写确认密码!',errorMsg:'两次密码输入不一致!',compare:'#newPassword'" maxlength="16">
                       <span class="help-block"></span>
                   </div>
               </div>

               <div class="postarea">
                   <div class="control-group">
                       <div class="controls">
                           @Html.AntiForgeryToken()
                           <button type="button" class="btn btn-primary btn-sm ui-pagePost" data-custom-params="url:'@Url.Action("ModifyPassword")'">提交</button>
                       </div>
                   </div>
               </div>
           </form>
        </div>
    </div>

<script type="text/javascript">
    $(".tabcontent").InitTab(); //初始化选项卡，并设置回调函数为LoadData()
    $("#_form").FormBind({dataSourceFrom:"attr"});
</script>
