Added new columsn to import BOD-386 BOD-387

This commit is contained in:
Patrick Fic
2020-10-05 13:20:19 -07:00
parent bc0aaf064c
commit 619df3620f
3 changed files with 11 additions and 7 deletions

View File

@@ -11,10 +11,10 @@ namespace BodyshopPartner.Utils.Queries
{
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
public static async Task<bool> CheckSupplementByClaimNo(string ClmNo)
public static async Task<string> CheckSupplementByClaimNo(string ClmNo)
{
if (string.IsNullOrEmpty(ClmNo))
return false;
return null;
var r = new GraphQLRequest
{
@@ -32,18 +32,18 @@ namespace BodyshopPartner.Utils.Queries
try
{
var d = await Utils.GraphQL.ExecuteQuery(r);
return d.jobs?.Count > 0;
return d.jobs?[1].id;
}
catch (ArgumentOutOfRangeException Ex)
{
logger.Trace(Ex, "No jobs returned in GQL query.");
return false;
return null;
}
catch (Exception Ex)
{
logger.Error(Ex, "Querying for jobs by clm_no failed.");
return false;
return null;
}
}
}