This commit is contained in:
@@ -1563,12 +1563,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -1813,12 +1815,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -2075,12 +2079,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -2327,12 +2333,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -2553,12 +2561,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -2780,12 +2790,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -3031,12 +3043,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -3283,12 +3297,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
@@ -3535,12 +3551,14 @@ namespace AyaNova.Biz
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
|
||||
}
|
||||
//Check state if updatable right now
|
||||
if(!isNew){
|
||||
//Check state if updatable right now
|
||||
if (!isNew)
|
||||
{
|
||||
//Front end is coded to save the state first before any other updates if it has changed and it would not be
|
||||
//a part of this header update so it's safe to check it here as it will be most up to date
|
||||
var CurrentWoStatus = await GetCurrentWorkOrderStatusFromRelatedAsync(proposedObj.AyaType, proposedObj.Id);
|
||||
if(CurrentWoStatus.Locked){
|
||||
if (CurrentWoStatus.Locked)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_CHANGEABLE, "generalerror", await Translate("WorkOrderErrorLocked"));
|
||||
return;//this is a completely disqualifying error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user