diff --git a/Site/Automation/Json-MasterPersonEditPaymentHistory.aspx.cs b/Site/Automation/Json-MasterPersonEditPaymentHistory.aspx.cs index 48e175fb..c1e1c060 100644 --- a/Site/Automation/Json-MasterPersonEditPaymentHistory.aspx.cs +++ b/Site/Automation/Json-MasterPersonEditPaymentHistory.aspx.cs @@ -17,7 +17,12 @@ namespace Swarmops.Frontend.Automation { this._authenticationData = GetAuthenticationDataAndCulture(); - int personId = Int32.Parse(Request.QueryString["PersonId"]); // may throw and that's okay + int personId = Int32.Parse(Request.QueryString["PersonId"]); // may throw and that's okay, returning a 500 instead of Json the caller shouldn't see + if (personId == 0) + { + personId = _authenticationData.CurrentUser.Identity; + } + this._person = Person.FromIdentity(personId); /* diff --git a/Site/Master-v5.master b/Site/Master-v5.master index ef6660b7..8363b31e 100644 --- a/Site/Master-v5.master +++ b/Site/Master-v5.master @@ -387,8 +387,8 @@ - - + + @@ -610,6 +610,10 @@ _master_PersonEditLoading = false; _master_PersonEditedId = personId; + $('#masterPersonEditTablePaymentHistory').treegrid({ + url: '/Automation/Json-MasterPersonEditPaymentHistory.aspx?PersonId=' + personId + }); + SwarmopsJS.ajaxCall('/Automation/SwarmFunctions.aspx/GetPersonEditorData', personEditorData, function(data) { if (data != null && data.Success) { $('span.spanModalEditingPersonName').text(data.Name);