|  |  | @ -10,28 +10,8 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.Show = function (data) { | 
			
		
	
		
			
				
					|  |  |  |         this.User = data; | 
			
		
	
		
			
				
					|  |  |  |         this.InitOrgList(); | 
			
		
	
		
			
				
					|  |  |  |         console.log(this.User) | 
			
		
	
		
			
				
					|  |  |  |         $('#edit-password-dialog').show(); | 
			
		
	
		
			
				
					|  |  |  |         $("#username").textbox('setValue', data.RealName); | 
			
		
	
		
			
				
					|  |  |  |         $("#account").textbox('setValue', data.LoginName); | 
			
		
	
		
			
				
					|  |  |  |         //$("#password").textbox('setValue', data.LoginPassword);
 | 
			
		
	
		
			
				
					|  |  |  |         parseInt($('#sex span').eq(0).attr('gender')) === data.Gender ? $('#sex span').eq(0).addClass('active') : $('#sex span').eq(0).removeClass('active'); | 
			
		
	
		
			
				
					|  |  |  |         parseInt($('#sex span').eq(1).attr('gender')) === data.Gender ? $('#sex span').eq(1).addClass('active') : $('#sex span').eq(1).removeClass('active'); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.InitOrgList = function () { | 
			
		
	
		
			
				
					|  |  |  |         $.ajax({ | 
			
		
	
		
			
				
					|  |  |  |             type: "POST", | 
			
		
	
		
			
				
					|  |  |  |             dataType: 'text', | 
			
		
	
		
			
				
					|  |  |  |             url: '/OrgManagement/Query', | 
			
		
	
		
			
				
					|  |  |  |             data: { | 
			
		
	
		
			
				
					|  |  |  |                 page: 1, | 
			
		
	
		
			
				
					|  |  |  |                 rows: 10000 | 
			
		
	
		
			
				
					|  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |             success: function (result) { | 
			
		
	
		
			
				
					|  |  |  |                 console.log(this.User.OrgId) | 
			
		
	
		
			
				
					|  |  |  |             }.bind(this) | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.OnSureButtonClick = function () { | 
			
		
	
	
		
			
				
					|  |  | @ -49,12 +29,6 @@ | 
			
		
	
		
			
				
					|  |  |  |             alert('两次输入的密码不一致'); | 
			
		
	
		
			
				
					|  |  |  |             return; | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |             //this.User.OrgId = $('#edit-dialog-org-list').combobox('getValue');
 | 
			
		
	
		
			
				
					|  |  |  |             //this.User.Gender = parseInt($('#sex span.active').attr('gender'));
 | 
			
		
	
		
			
				
					|  |  |  |             //this.User.RealName = $("#username").textbox('getValue');
 | 
			
		
	
		
			
				
					|  |  |  |             //this.User.LoginName = $('#account').textbox('getValue');
 | 
			
		
	
		
			
				
					|  |  |  |             //this.User.LoginPassword = $('#password').textbox('getValue');
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             this.EditUser(); | 
			
		
	
		
			
				
					|  |  |  |             this.HideDialog(); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
	
		
			
				
					|  |  | @ -62,24 +36,24 @@ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.HideDialog = function () { | 
			
		
	
		
			
				
					|  |  |  |         $('#edit-password-dialog').hide(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         this.clearInput(); | 
			
		
	
		
			
				
					|  |  |  |         $('#password').textbox('setValue', ''); | 
			
		
	
		
			
				
					|  |  |  |         $('#confirm-password').textbox('setValue', ''); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.EditUser = function () { | 
			
		
	
		
			
				
					|  |  |  |         console.log(this.User.Id); | 
			
		
	
		
			
				
					|  |  |  |         console.log($('#password').textbox('getValue')) | 
			
		
	
		
			
				
					|  |  |  |         $.ajax({ | 
			
		
	
		
			
				
					|  |  |  |             type: "POST", | 
			
		
	
		
			
				
					|  |  |  |             dataType: 'text', | 
			
		
	
		
			
				
					|  |  |  |             url: '/UserManagement/Update', | 
			
		
	
		
			
				
					|  |  |  |             data: this.User, | 
			
		
	
		
			
				
					|  |  |  |             success: function () { | 
			
		
	
		
			
				
					|  |  |  |                 this.Parent.ReLoadTableData($('#org-list').combobox('getValue')); | 
			
		
	
		
			
				
					|  |  |  |             url: '/UserManagement/UpdatePassword', | 
			
		
	
		
			
				
					|  |  |  |             data: { | 
			
		
	
		
			
				
					|  |  |  |                 id: this.User.Id, | 
			
		
	
		
			
				
					|  |  |  |                 newPassword: $('#password').textbox('getValue'), | 
			
		
	
		
			
				
					|  |  |  |             }, | 
			
		
	
		
			
				
					|  |  |  |             success: function (result) { | 
			
		
	
		
			
				
					|  |  |  |                 console.log(result) | 
			
		
	
		
			
				
					|  |  |  |             }.bind(this) | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     this.clearInput = function () { | 
			
		
	
		
			
				
					|  |  |  |         $('#password').textbox('setValue', ''), | 
			
		
	
		
			
				
					|  |  |  |         $('#confirm-password').textbox('setValue', '') | 
			
		
	
		
			
				
					|  |  |  |     }; | 
			
		
	
		
			
				
					|  |  |  | }; |