Skip to content

Commit

Permalink
Sep 18 - Commit with changes in ccof model for providerfiscal profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashanthi-Sivanarayana committed Sep 18, 2023
1 parent 0bd4ab5 commit a7ab105
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
Binary file modified .vs/CCOF/v17/.suo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ and Microsoft.Dynamics.CRM.In(PropertyName='ccof_facilitystatus',PropertyValues=

// A simple way to remove unwanted attributes
var userProfileString = JsonConvert.SerializeObject(dynUserProfile);
UserProfile userProfile = System.Text.Json.JsonSerializer.Deserialize<UserProfile>(userProfileString);
FiscalUserProfile userProfile = System.Text.Json.JsonSerializer.Deserialize<FiscalUserProfile>(userProfileString);

return userProfile;
}
Expand Down
29 changes: 14 additions & 15 deletions CCOF.Infrastructure.WebAPI/Controllers/ProviderProfileController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,24 @@ and Microsoft.Dynamics.CRM.In(PropertyName='ccof_facilitystatus',PropertyValues=
if (applicationResponse.IsSuccessStatusCode)
{
dynamic jResult1 = JObject.Parse(applicationResponse.Content.ReadAsStringAsync().Result);
JArray applicationArray = new JArray();

dynamic appWithECEWE = null;
dynamic appwithCCOF = null;
dynamic appwithCCFRI = null;
dynamic appWithCR = null;
applicationArray = jResult1["value"].ToObject<JArray>();
dynUserProfile.application = jResult1.value;
for (int i = 0; i < applicationArray.Count; i++)
{
appWithCR = AppendChangeRequests(applicationArray[i], applicationArray[i]["ccof_applicationid"].ToString());
appWithECEWE = AppendApplicationECEWE(applicationArray[i], applicationArray[i]["ccof_applicationid"].ToString());
appwithCCOF = AppendApplicationCCOF(applicationArray[i], applicationArray[i]["ccof_applicationid"].ToString());
appwithCCFRI = AppendApplicationCCFRI(applicationArray[i], applicationArray[i]["ccof_applicationid"].ToString());

dynUserProfile.application[i] = appWithCR;
dynUserProfile.application[i] = appWithECEWE;
dynUserProfile.application[i] = appwithCCOF;
dynUserProfile.application[i] = appwithCCFRI;
}


appWithECEWE = AppendApplicationECEWE(jResult1.value[0], token["Application.ccof_applicationid"].ToString());
dynUserProfile.application = appWithECEWE;
appwithCCOF = AppendApplicationCCOF(appWithECEWE, token["Application.ccof_applicationid"].ToString());
dynUserProfile.application = appwithCCOF;
appwithCCFRI = AppendApplicationCCFRI(appwithCCOF, token["Application.ccof_applicationid"].ToString());
dynUserProfile.application = appwithCCFRI;
appWithCR = AppendChangeRequests(appwithCCFRI, token["Application.ccof_applicationid"].ToString());
dynUserProfile.application = appWithCR;




}

Expand Down
29 changes: 29 additions & 0 deletions CCOF.Infrastructure.WebAPI/Models/CCOFModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ public class UserProfile

public Facility[]? facilities { get; set; }

public Application? application { get; set; }
}
public class FiscalUserProfile
{
public string? ccof_username { get; set; }

public string? ccof_userid { get; set; }

[JsonPropertyName("Organization.accountid")]

public string? organization_accountid { get; set; }
[JsonPropertyName("Organization.accountnumber")]

public string? organization_accountnumber { get; set; }

[JsonPropertyName("Organization.name")]
public string? organization_name { get; set; }

[JsonPropertyName("Organization.ccof_fundingagreementnumber")]
public string? organization_ccof_fundingagreementnumber { get; set; }

[JsonPropertyName("Organization.ccof_contractstatus")]
public int? organization_ccof_contractstatus { get; set; }

[JsonPropertyName("Organization.ccof_formcomplete")]
public bool? organization_ccof_formcomplete { get; set; }

public Facility[]? facilities { get; set; }

public Application[]? application { get; set; }
}

Expand Down

0 comments on commit a7ab105

Please sign in to comment.