This commit is contained in:
@@ -333,8 +333,9 @@ namespace Sockeye.Biz
|
|||||||
var p = await ct.Purchase.FirstOrDefaultAsync(z => z.SalesOrderNumber == salesOrderNumber);
|
var p = await ct.Purchase.FirstOrDefaultAsync(z => z.SalesOrderNumber == salesOrderNumber);
|
||||||
if (p == null)
|
if (p == null)
|
||||||
{
|
{
|
||||||
log.LogError($"RFImport Vendor notifications can't match sales order number {salesOrderNumber}");
|
//this is only test orders no real orders hit here
|
||||||
log.LogError(jData["order_notification"].ToString());
|
// log.LogError($"RFImport Vendor notifications can't match sales order number {salesOrderNumber}");
|
||||||
|
// log.LogError(jData["order_notification"].ToString());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -567,8 +568,8 @@ namespace Sockeye.Biz
|
|||||||
var jKey = JObject.Parse(keyNoWS);
|
var jKey = JObject.Parse(keyNoWS);
|
||||||
//In v7 the license expires is an optional property set called "LockDate"
|
//In v7 the license expires is an optional property set called "LockDate"
|
||||||
l.LicenseExpire = null;
|
l.LicenseExpire = null;
|
||||||
if (jKey["AyaNovaLicenseKey"]["LockDate"] != null)
|
if (jKey["AyaNovaLiteLicenseKey"]["LockDate"] != null)
|
||||||
l.LicenseExpire = jKey["AyaNovaLicenseKey"]["LockDate"].Value<DateTime>().ToUniversalTime();
|
l.LicenseExpire = jKey["AyaNovaLiteLicenseKey"]["LockDate"].Value<DateTime>().ToUniversalTime();
|
||||||
|
|
||||||
l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value<DateTime>().ToUniversalTime();
|
l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value<DateTime>().ToUniversalTime();
|
||||||
l.PGroup = ProductGroup.AyaNova7;
|
l.PGroup = ProductGroup.AyaNova7;
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ namespace Sockeye.Biz
|
|||||||
return ParseKeySetDTOFields(ret);
|
return ParseKeySetDTOFields(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region PARSE KEY SET DTO FIELDS
|
||||||
//Read the license key text, parse it and set the dto fields accordingly
|
//Read the license key text, parse it and set the dto fields accordingly
|
||||||
internal License ParseKeySetDTOFields(License l)
|
internal License ParseKeySetDTOFields(License l)
|
||||||
{
|
{
|
||||||
@@ -278,7 +279,7 @@ namespace Sockeye.Biz
|
|||||||
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(l.Key, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(l.Key, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
||||||
var jKey = JObject.Parse(keyNoWS);
|
var jKey = JObject.Parse(keyNoWS);
|
||||||
l.Users = 1;
|
l.Users = 1;
|
||||||
var jaPlugins = (JArray)jKey.SelectToken("AyaNovaLicenseKey.Plugins.Plugin");
|
var jaPlugins = (JArray)jKey.SelectToken("AyaNovaLiteLicenseKey.Plugins.Plugin");
|
||||||
for (int x = 0; x < jaPlugins.Count; x++)
|
for (int x = 0; x < jaPlugins.Count; x++)
|
||||||
{
|
{
|
||||||
var jPlugin = (JObject)jaPlugins[x];
|
var jPlugin = (JObject)jaPlugins[x];
|
||||||
@@ -428,6 +429,8 @@ namespace Sockeye.Biz
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion parsekeysetdtofields
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//UPDATE
|
//UPDATE
|
||||||
//
|
//
|
||||||
@@ -486,9 +489,6 @@ namespace Sockeye.Biz
|
|||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
var IDList = await ct.Review.AsNoTracking().Where(x => x.SockType == SockType.License && x.ObjectId == id).Select(x => x.Id).ToListAsync();
|
var IDList = await ct.Review.AsNoTracking().Where(x => x.SockType == SockType.License && x.ObjectId == id).Select(x => x.Id).ToListAsync();
|
||||||
if (IDList.Count() > 0)
|
if (IDList.Count() > 0)
|
||||||
@@ -578,10 +578,12 @@ namespace Sockeye.Biz
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async Task ValidateCanDeleteAsync(License inObj)
|
private void ValidateCanDeleteAsync(License inObj)
|
||||||
{
|
{
|
||||||
|
|
||||||
await Task.CompletedTask;
|
if(inObj.FetchedOn!=null)
|
||||||
|
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", "Fetched, not deletable");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user