This commit is contained in:
@@ -333,8 +333,9 @@ namespace Sockeye.Biz
|
||||
var p = await ct.Purchase.FirstOrDefaultAsync(z => z.SalesOrderNumber == salesOrderNumber);
|
||||
if (p == null)
|
||||
{
|
||||
log.LogError($"RFImport Vendor notifications can't match sales order number {salesOrderNumber}");
|
||||
log.LogError(jData["order_notification"].ToString());
|
||||
//this is only test orders no real orders hit here
|
||||
// log.LogError($"RFImport Vendor notifications can't match sales order number {salesOrderNumber}");
|
||||
// log.LogError(jData["order_notification"].ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -567,8 +568,8 @@ namespace Sockeye.Biz
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
//In v7 the license expires is an optional property set called "LockDate"
|
||||
l.LicenseExpire = null;
|
||||
if (jKey["AyaNovaLicenseKey"]["LockDate"] != null)
|
||||
l.LicenseExpire = jKey["AyaNovaLicenseKey"]["LockDate"].Value<DateTime>().ToUniversalTime();
|
||||
if (jKey["AyaNovaLiteLicenseKey"]["LockDate"] != null)
|
||||
l.LicenseExpire = jKey["AyaNovaLiteLicenseKey"]["LockDate"].Value<DateTime>().ToUniversalTime();
|
||||
|
||||
l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value<DateTime>().ToUniversalTime();
|
||||
l.PGroup = ProductGroup.AyaNova7;
|
||||
|
||||
@@ -73,6 +73,7 @@ namespace Sockeye.Biz
|
||||
return ParseKeySetDTOFields(ret);
|
||||
}
|
||||
|
||||
#region PARSE KEY SET DTO FIELDS
|
||||
//Read the license key text, parse it and set the dto fields accordingly
|
||||
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");
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
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++)
|
||||
{
|
||||
var jPlugin = (JObject)jaPlugins[x];
|
||||
@@ -428,6 +429,8 @@ namespace Sockeye.Biz
|
||||
|
||||
}
|
||||
|
||||
#endregion parsekeysetdtofields
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//UPDATE
|
||||
//
|
||||
@@ -486,9 +489,6 @@ namespace Sockeye.Biz
|
||||
if (HasErrors)
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
var IDList = await ct.Review.AsNoTracking().Where(x => x.SockType == SockType.License && x.ObjectId == id).Select(x => x.Id).ToListAsync();
|
||||
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