This commit is contained in:
@@ -238,7 +238,7 @@ namespace AyaNovaQBI
|
||||
{
|
||||
if (i.Active)
|
||||
{
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.Id == i.Id);
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
@@ -269,7 +269,7 @@ namespace AyaNovaQBI
|
||||
{
|
||||
if (i.Active)
|
||||
{
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.Id == i.Id);
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
@@ -308,7 +308,7 @@ namespace AyaNovaQBI
|
||||
//After discussion we decided to not us any rate unit charge description
|
||||
//so leaving the code in but defaulted to guid.empty for now.
|
||||
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.Id == i.Id);
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
@@ -351,7 +351,7 @@ namespace AyaNovaQBI
|
||||
//After discussion we decided to not us any rate unit charge description
|
||||
//so leaving the code in but defaulted to guid.empty for now.
|
||||
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.Id == i.Id);
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
@@ -387,7 +387,7 @@ namespace AyaNovaQBI
|
||||
if (i.Active)
|
||||
{
|
||||
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.Id == i.Id);
|
||||
bool bLinked = util.QBIntegration.Items.Any(z => z.AType == _Type && z.ObjectId == i.Id);
|
||||
if (DisplayRow(bLinked))
|
||||
{
|
||||
var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id);
|
||||
|
||||
@@ -1300,16 +1300,17 @@ namespace AyaNovaQBI
|
||||
//Save if changes made
|
||||
if (QDat.IsDirty)
|
||||
{
|
||||
await IntegrationLog("ValidateSettings: QBI settings modified by user, saving now");
|
||||
QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat);
|
||||
ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration));
|
||||
QBIntegration.Concurrency = r.ObjectResponse["data"]["concurrency"].Value<uint>();
|
||||
////Case 299
|
||||
//QBI.AIObject = QDat.XMLData;
|
||||
////QBI.AIObject=QDat;
|
||||
//await IntegrationLog("ValidateSettings: QBI settings modified by user, saving now");
|
||||
//QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat);
|
||||
//ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration));
|
||||
//QBIntegration.Concurrency = r.ObjectResponse["data"]["concurrency"].Value<uint>();
|
||||
//////Case 299
|
||||
////QBI.AIObject = QDat.XMLData;
|
||||
//////QBI.AIObject=QDat;
|
||||
|
||||
//QBI = (Integration)QBI.Save();
|
||||
QDat.IsDirty = false;
|
||||
////QBI = (Integration)QBI.Save();
|
||||
//QDat.IsDirty = false;
|
||||
await SaveIntegrationObject();
|
||||
}
|
||||
await IntegrationLog($"ValidateSettings: QBI main integration data that will be used for this session \"{QBIntegration.IntegrationData}\" ");
|
||||
|
||||
@@ -1320,13 +1321,15 @@ namespace AyaNovaQBI
|
||||
#region Integration object persistance
|
||||
public static async Task SaveIntegrationObject()
|
||||
{
|
||||
//NOTE: this put route returns the entire integration object in order to update the concurrency tokens of the items collection
|
||||
//ensures clean updates and current information
|
||||
if (QDat.IsDirty)
|
||||
{
|
||||
await IntegrationLog("ValidateSettings: QBI settings modified by user, saving now");
|
||||
QBIntegration.IntegrationData = Newtonsoft.Json.JsonConvert.SerializeObject(QDat);
|
||||
}
|
||||
ApiResponse r = await PutAsync("integration", Newtonsoft.Json.JsonConvert.SerializeObject(QBIntegration));
|
||||
QBIntegration.Concurrency = r.ObjectResponse["data"]["concurrency"].Value<uint>();
|
||||
QBIntegration = r.ObjectResponse["data"].ToObject<Integration>();
|
||||
QDat.IsDirty = false;
|
||||
}
|
||||
#endregion integration object persistance
|
||||
|
||||
Reference in New Issue
Block a user