
var cst=2274;var oxe="DefaultF_";var lsf=null;$(window).load(function(){chq();$("#btn_updateUserMsg").unbind("click").bind("click",function(){pjx()})});function chq(){var c="/Designer/WebServices/System/User.asmx/GetMyMsg";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a)){lsf=a;a.Birthday=cwi(a.Birthday);pet(cst,oxe,2);lwg(cst,oxe,a,null);rmb();ddm()}else pet(cst,oxe,1)},beforeSend:function(a){},complete:function(a,b){},error:function(a){}})}
function rmb(){var e="/WebServices/DataSource/DataSource.asmx/rmb";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:e,data:"{}",dataType:'json',success:function(a){a=hmy(a);if(!ymr(a)&&a.length>0){var b=$("#d"+cst+"_PositionId");var c=lsf.PositionId;var d=new nzy();for(var i=0;i<a.length;i++){d.append("<option value=\""+a[i].PositionId+"\">"+a[i].PositionName+"</option>\n")}
b.html(d.toString());b.val(c)}},beforeSend:function(a){},complete:function(a,b){},error:function(a){}})}
function ddm(){var c="/Designer/WebServices/System/User.asmx/ddm";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:c,data:"{}",dataType:'json',success:function(v){v=hmy(v);if(!ymr(v)){$("#d"+cst+"_CurSystemId").text(v)}},beforeSend:function(a){},complete:function(a,b){},error:function(a){}})}
function pjx(){var c=yci(cst,oxe);var d=null;var e=col(cst,oxe);d=e.$form;if(d==null){art.VLdialog.alert("获取表单的HTML对象失败。请确认代码正确。",function(){},4,"提示");return}
var f=sme(d,false,cst,oxe,true,cst,c,true);if(ymr(f)||f==false){art.VLdialog.alert("获取表单数据失败。请确认输入是否正确。",function(){},4,"提示");return}
var g="/Designer/WebServices/System/User.asmx/SetMyMsg";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:g,data:"{model:"+JSON2.stringify(f)+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("操作失败。详情："+b);return false},success:function(a){a=hmy(a);if(a)art.VLdialog.alert("保存成功！",function(){},20,"提示");else art.VLdialog.alert("保存失败。",function(){},8,"提示")}})}