This commit is contained in:
@@ -227,12 +227,26 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
bool isNew = currentObj == null;
|
bool isNew = currentObj == null;
|
||||||
|
|
||||||
|
|
||||||
|
if (!isNew)
|
||||||
|
{
|
||||||
|
//if it was already accepted then it must stay accepted
|
||||||
|
if (currentObj.Status == CustomerServiceRequestStatus.Accepted && proposedObj.Status != CustomerServiceRequestStatus.Accepted)
|
||||||
|
{
|
||||||
|
AddError(ApiErrorCode.INVALID_OPERATION, "generalerror", "Already accepted, can't be changed");//User should never see this but an api user might as it's a form locked thing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Name required BUT NOT REQUIRED TO BE UNIQUE
|
//Name required BUT NOT REQUIRED TO BE UNIQUE
|
||||||
if (string.IsNullOrWhiteSpace(proposedObj.Name))
|
if (string.IsNullOrWhiteSpace(proposedObj.Name))
|
||||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "Name");
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, "Name");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Any form customizations to validate?
|
//Any form customizations to validate?
|
||||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.CustomerServiceRequest.ToString());
|
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.CustomerServiceRequest.ToString());
|
||||||
if (FormCustomization != null)
|
if (FormCustomization != null)
|
||||||
@@ -251,6 +265,9 @@ namespace AyaNova.Biz
|
|||||||
private void ValidateCanDelete(CustomerServiceRequest inObj)
|
private void ValidateCanDelete(CustomerServiceRequest inObj)
|
||||||
{
|
{
|
||||||
//whatever needs to be check to delete this object
|
//whatever needs to be check to delete this object
|
||||||
|
//can't delete if it's accepted
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 630;
|
internal const long EXPECTED_COLUMN_COUNT = 645;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 175;
|
internal const long EXPECTED_INDEX_COUNT = 178;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user