This commit is contained in:
@@ -380,7 +380,7 @@ namespace AyaNova
|
||||
// ******************** TESTING WIPE DB *****************************
|
||||
//
|
||||
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
|
||||
var TESTING_REFRESH_DB = true;//#############################################################################################
|
||||
var TESTING_REFRESH_DB = false;//#############################################################################################
|
||||
|
||||
#if (DEBUG)
|
||||
//TESTING
|
||||
|
||||
@@ -160,8 +160,12 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(DataFilter dbObj, DataFilter inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Replace the db object with the PUT object
|
||||
CopyObject.Copy(inObj, dbObj, "Id,Serial");
|
||||
CopyObject.Copy(inObj, dbObj, "Id");
|
||||
//Set "original" value of concurrency token to input token
|
||||
//this will allow EF to check it out
|
||||
ct.Entry(dbObj).OriginalValues["ConcurrencyToken"] = inObj.ConcurrencyToken;
|
||||
@@ -278,7 +282,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
if (filterItem["value"] == null)
|
||||
AddError(ValidationErrorType.RequiredPropertyEmpty, "Filter", $"Filter array item {i}, object is missing required \"value\" property ");
|
||||
//NOTE: value of nothing, null or empty is a valid value so no checking for it here
|
||||
//NOTE: value of nothing, null or empty is a valid value so no checking for it here
|
||||
}
|
||||
}
|
||||
catch (Newtonsoft.Json.JsonReaderException ex)
|
||||
|
||||
@@ -170,6 +170,10 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(Tag dbObj, Tag inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Ensure it follows the rules
|
||||
inObj.Name = CleanTagName(inObj.Name);
|
||||
|
||||
|
||||
@@ -187,6 +187,10 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(TagGroup dbObj, TagGroup inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Ensure it follows the rules
|
||||
inObj.Name = CleanTagGroupName(inObj.Name);
|
||||
|
||||
|
||||
@@ -220,6 +220,10 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(User dbObj, User inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Get a snapshot of the original db value object before changes
|
||||
User SnapshotObj = new User();
|
||||
CopyObject.Copy(dbObj, SnapshotObj);
|
||||
|
||||
@@ -45,7 +45,10 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(UserOptions dbObj, UserOptions inObj)
|
||||
{
|
||||
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Replace the db object with the PUT object
|
||||
CopyObject.Copy(inObj, dbObj, "Id, UserId, OwnerId");
|
||||
//Set "original" value of concurrency token to input token
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal WidgetBiz(AyContext dbcontext, long currentUserId, long userLocaleId, AuthorizationRoles UserRoles)
|
||||
{
|
||||
ct = dbcontext;
|
||||
@@ -227,6 +227,9 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal bool Put(Widget dbObj, Widget inObj)
|
||||
{
|
||||
//preserve the owner ID if none was specified
|
||||
if (inObj.OwnerId == 0)
|
||||
inObj.OwnerId = dbObj.OwnerId;
|
||||
|
||||
//Replace the db object with the PUT object
|
||||
CopyObject.Copy(inObj, dbObj, "Id,Serial");
|
||||
|
||||
Reference in New Issue
Block a user