This commit is contained in:
2020-05-13 21:41:03 +00:00
parent a45abb7467
commit 1c55c3126c

View File

@@ -265,13 +265,13 @@ namespace AyaNova.Biz
} }
} }
////////////////////////////////////////////////////////////////////////////////////////////////
//SEARCH
//
private async Task SearchIndexAsync(Widget obj, bool isNew) private async Task SearchIndexAsync(Widget obj, bool isNew)
{ {
//SEARCH INDEXING
var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType); var SearchParams = new Search.SearchIndexProcessObjectParameters(UserTranslationId, obj.Id, BizType);
SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Serial).AddText(obj.Wiki).AddText(obj.Tags).AddCustomFields(obj.CustomFields); SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Serial).AddText(obj.Wiki).AddText(obj.Tags).AddCustomFields(obj.CustomFields);
if (isNew) if (isNew)
await Search.ProcessNewObjectKeywordsAsync(SearchParams); await Search.ProcessNewObjectKeywordsAsync(SearchParams);
else else
@@ -288,16 +288,11 @@ namespace AyaNova.Biz
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
//VALIDATION //VALIDATION
// //
//Can save or update?
private async Task ValidateAsync(Widget proposedObj, Widget currentObj) private async Task ValidateAsync(Widget proposedObj, Widget currentObj)
{ {
//NOTE: In DB schema only name and serial are not nullable //NOTE: In DB schema only name and serial are not nullable
//run validation and biz rules //run validation and biz rules
@@ -351,15 +346,12 @@ namespace AyaNova.Biz
//validate custom fields //validate custom fields
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields); CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
} }
} }
private void ValidateCanDelete(Widget inObj)
//Can delete? {
// private void ValidateCanDelete(Widget inObj) //whatever needs to be check to delete this object
// { }
// //whatever needs to be check to delete this object
// }