var Account={ChangePassword:{ElemAssembly:{oldPawd:0,newPawd:0,confirmPawd:0,提交按钮:0},DataAssembly:{Post:{oldPawd:"",newPawd:""}},initData:function(){var a=this;Global.LoadIng.ready(function(){var c=$("#OldPassword"),b=$("#提交按钮");a.ElemAssembly.oldPawd=c;a.ElemAssembly.newPawd=$("#NewPassword");a.ElemAssembly.confirmPawd=$("#ConfirmPassword");a.ElemAssembly.提交按钮=b;Global.Object.Tag.onFocus(c);Global.AccessKey.KeyDown.enter(function(){Global.Object.Tag.onClick(b)})})},getHtmlElem:function(a){return this.ElemAssembly[a]},getHtmlValue:function(b){var a=this.getHtmlElem(b);return a?a.val():""},Format:{oldPawd:function(c){var a=Account.ChangePassword.getHtmlElem("oldPawd"),b=a.val();if(b.trim()==""){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"请输入原密码！",a)}else if(b.length<6){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"原密码不能少于6位！",a)}else Global.CallBack.true_1(c,b)},newPawd:function(c){var a=Account.ChangePassword.getHtmlElem("newPawd"),b=a.val();if(b.trim()==""){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"请输入新密码！",a)}else if(b.length<6){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"新密码不能少于6位！",a)}else Global.CallBack.true_1(c,b)},confirmPawd:function(c){var a=Account.ChangePassword.getHtmlElem("confirmPawd"),b=a.val(),d=Account.ChangePassword.getHtmlElem("newPawd").val();if(b.trim()==""){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"请输入确认密码！",a)}else if(b!=d){Global.Object.Tag.onFocus(a);Global.CallBack.false_3(c,"密码不一致",a)}else Global.CallBack.true_1(c,b)}},postComplete:function(){this.ElemAssembly.oldPawd.val("").focus();this.ElemAssembly.newPawd.val("");this.ElemAssembly.confirmPawd.val("")},postAjax:function(b){var a="Account-ChangePassword";Global.Boxy.wait(a,{newTitle:"修改",dtHtml:"修改密码",triggerBtn:Account.ChangePassword.ElemAssembly.提交按钮});Global.AjaxServer.Post.json("/Account/ChangePassword/",b,function(b){if(b.result)Global.Boxy.success(a,{newTitle:"修改成功",dtHtml:"您已成功修改密码！",boxyOptions:{afterHide:function(){Account.ChangePassword.postComplete()}}});else Global.Boxy.failure(a,{newTitle:"修改失败",dtHtml:"密码修改失败",newMessage:b.info,boxyOptions:{afterHide:function(){Account.ChangePassword.postComplete()}}})})},submit:function(){Global.MsgBox.submit(this,["oldPawd","newPawd","confirmPawd"])}},Details:{ElemAssembly:{邮箱:0,提交按钮:0},initData:function(a){this.DataAssembly.Post.编号=a.编号;this.DataAssembly.Post.姓名=a.姓名;this.DataAssembly.Post.性别=a.性别;this.DataAssembly.Post.部门ID=a.部门ID;this.DataAssembly.Backup.邮箱=a.邮箱;var b=this;Global.LoadIng.ready(function(){var c=$("#邮箱"),a=$("#提交按钮");b.ElemAssembly.邮箱=c;b.ElemAssembly.提交按钮=a;Global.Object.Tag.inputFE(c);Global.AccessKey.KeyDown.enter(function(){Global.Object.Tag.onClick(a)})})},DataAssembly:{Post:{编号:"",姓名:"",部门ID:"",性别:"",邮箱:""},Backup:{邮箱:""}},Format:{邮箱:function(d){var a=Account.Details.ElemAssembly.邮箱,b=a.val().trim(),c=Account.Details.DataAssembly.Backup.邮箱;Global.Format.email(b,c,false,a,d)}},postAjax:function(a){Global.Boxy.wait("Account-Details",{newTitle:"保存",dtHtml:"保存资料",triggerBtn:Account.Details.ElemAssembly.提交按钮});Global.AjaxServer.Post.json("/Account/Details/",a,function(a){if(a.result)Global.Boxy.success("Account-Details",{newTitle:"保存成功",dtHtml:"您的资料已保存成功！"});else Global.Boxy.failure("Account-Details",{newTitle:"保存失败",dtHtml:"资料保存失败",newMessage:a.info})})},submit:function(){Global.MsgBox.submit(this,["邮箱"])}}}