sult + ')');
        if (result.errorMsg) {
          $.messager.show({
            title: 'Error', msg: result.errorMsg
          })
        } else {
          $('#dlg').dialog('close');		// close the dialog
          $('#dg').datagrid('reload')	// reload the user data
        }
      }
    })
  }

  function destroyUser() {
    var row = $('#dg').datagrid('getSelected');
    if (row) {
      $.messager.confirm('Confirm', 'Are you sure you want to destroy this user?', function (r) {
        if (r) {
      