This commit is contained in:
@@ -262,7 +262,9 @@ namespace Sockeye.Biz
|
|||||||
{
|
{
|
||||||
//create product if not exist then import
|
//create product if not exist then import
|
||||||
//Get product id if exists
|
//Get product id if exists
|
||||||
var p = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.Name == jPurchase["name"].Value<string>());
|
var ProductName = jPurchase["name"].Value<string>();
|
||||||
|
ProductName = ProductName.Replace("- Renewal", "").Replace(" Renewal", "").Replace(" RENEWAL", "").Replace("CANCELLED ", "");
|
||||||
|
var p = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.Name == ProductName);
|
||||||
if (p == null)
|
if (p == null)
|
||||||
{
|
{
|
||||||
//Create it here
|
//Create it here
|
||||||
|
|||||||
@@ -155,17 +155,15 @@ namespace Sockeye.Util
|
|||||||
|
|
||||||
public static DateTime? EpochToDateNullIsNull(long? uepoch)
|
public static DateTime? EpochToDateNullIsNull(long? uepoch)
|
||||||
{
|
{
|
||||||
DateTime dt = DateTime.Now;
|
|
||||||
if (uepoch == null) return null;
|
if (uepoch == null) return null;
|
||||||
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).DateTime;
|
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).UtcDateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static DateTime EpochToDateNullIsMin(long? uepoch)
|
public static DateTime EpochToDateNullIsMin(long? uepoch)
|
||||||
{
|
{
|
||||||
DateTime dt = DateTime.Now;
|
|
||||||
if (uepoch == null) return DateTime.MinValue;
|
if (uepoch == null) return DateTime.MinValue;
|
||||||
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).DateTime;
|
return DateTimeOffset.FromUnixTimeSeconds(uepoch.Value).UtcDateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user