This commit is contained in:
2022-03-07 20:12:13 +00:00
parent 73f8dbc3dc
commit 0ea991b8f3
2 changed files with 16 additions and 16 deletions

View File

@@ -1286,7 +1286,7 @@ namespace AyaNova.Biz
//Conditions: must match specific status id value and also tags below //Conditions: must match specific status id value and also tags below
//delivery is immediate so no need to remove old ones of this kind //delivery is immediate so no need to remove old ones of this kind
//note order by id ascending so that only the oldest notification "wins" as per docs in case of overlap to same customer //note order by id ascending so that only the oldest notification "wins" as per docs in case of overlap to same customer
var subs = await ct.CustomerNotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.QuoteStatusChange && z.IdValue == oProposed.QuoteStatusId).OrderBy(z=>z.Id).ToListAsync(); var subs = await ct.CustomerNotifySubscription.AsNoTracking().Where(z => z.EventType == NotifyEventType.QuoteStatusChange && z.IdValue == oProposed.QuoteStatusId).OrderBy(z => z.Id).ToListAsync();
foreach (var sub in subs) foreach (var sub in subs)
{ {
@@ -1297,17 +1297,17 @@ namespace AyaNova.Biz
NotifyEvent n = new NotifyEvent() CustomerNotifyEvent n = new CustomerNotifyEvent()
{ {
EventType = NotifyEventType.QuoteStatusChange, EventType = NotifyEventType.QuoteStatusChange,
UserId = sub.UserId, CustomerId = QuoteInfo.CustomerId,
AyaType = AyaType.Quote, AyaType = AyaType.Quote,
ObjectId = oProposed.QuoteId, ObjectId = oProposed.QuoteId,
NotifySubscriptionId = sub.Id, CustomerNotifySubscriptionId = sub.Id,
Name = $"{QuoteInfo.Serial.ToString()} - {qos.Name}" Name = $"{QuoteInfo.Serial.ToString()} - {qos.Name}"
}; };
await ct.NotifyEvent.AddAsync(n); await ct.CustomerNotifyEvent.AddAsync(n);
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]"); log.LogDebug($"Adding CustomerNotifyEvent: [{n.ToString()}]");
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
break;//we have a match no need to process any further subs for this event break;//we have a match no need to process any further subs for this event
} }

View File

@@ -22,16 +22,16 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 1; private const int DESIRED_SCHEMA_LEVEL = 1;
internal const long EXPECTED_COLUMN_COUNT = 1342; internal const long EXPECTED_COLUMN_COUNT = 1353;
internal const long EXPECTED_INDEX_COUNT = 154; internal const long EXPECTED_INDEX_COUNT = 155;
internal const long EXPECTED_CHECK_CONSTRAINTS = 533; internal const long EXPECTED_CHECK_CONSTRAINTS = 542;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 199; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 201;
internal const long EXPECTED_VIEWS = 11; internal const long EXPECTED_VIEWS = 11;
internal const long EXPECTED_ROUTINES = 2; internal const long EXPECTED_ROUTINES = 2;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////// C1341:I154:CC532:FC199:V11:R2) ///////////////////////////////////////// (C1353:I155:CC542:FC201:V11:R2)
/* /*