This commit is contained in:
@@ -39,19 +39,18 @@ namespace AyaNova.Biz
|
|||||||
_ayaType = aType;
|
_ayaType = aType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AyaTypeId(string sATypeNumeral, string sId)
|
[Newtonsoft.Json.JsonConstructor]
|
||||||
|
public AyaTypeId(string sAType, string sId)
|
||||||
{
|
{
|
||||||
_id = long.Parse(sId);
|
_id = long.Parse(sId);
|
||||||
int nType = int.Parse(sATypeNumeral);
|
int nType = int.Parse(sAType);
|
||||||
if (!AyaTypeExists(nType))
|
if (!AyaTypeExists(nType))
|
||||||
_ayaType = AyaType.NoType;
|
_ayaType = AyaType.NoType;
|
||||||
else
|
else
|
||||||
_ayaType = (AyaType)Enum.Parse(typeof(AyaType), sATypeNumeral);
|
_ayaType = (AyaType)Enum.Parse(typeof(AyaType), sAType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AyaTypeId()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Equals(AyaTypeId x, AyaTypeId y)
|
public bool Equals(AyaTypeId x, AyaTypeId y)
|
||||||
{
|
{
|
||||||
@@ -75,7 +74,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -166,10 +166,11 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
await WorkOrderHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
|
||||||
|
|
||||||
if (!newObject.GenCopyAttachmentsFrom.IsEmpty)
|
if (newObject.GenCopyAttachmentsFrom !=null && !newObject.GenCopyAttachmentsFrom.IsEmpty)
|
||||||
{
|
{
|
||||||
//copy attachment from existing object
|
//copy attachment from existing object
|
||||||
|
|
||||||
|
newObject.GenCopyAttachmentsFrom=null;//so it doesn't get returned
|
||||||
}
|
}
|
||||||
return newObject;
|
return newObject;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ namespace AyaNova.Models
|
|||||||
public bool UserCanViewLoanerCosts { get; set; }
|
public bool UserCanViewLoanerCosts { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped,JsonProperty(NullValueHandling=NullValueHandling.Ignore)]
|
||||||
public AyaTypeId GenCopyAttachmentsFrom { get; set; }//INTERNAL, USED TO SIGNIFY ATTACHMENTS NEED TO BE COPIED ON SAVE
|
public AyaTypeId GenCopyAttachmentsFrom { get; set; }//INTERNAL, USED TO SIGNIFY ATTACHMENTS NEED TO BE COPIED ON SAVE
|
||||||
|
|
||||||
[NotMapped, JsonIgnore]
|
[NotMapped, JsonIgnore]
|
||||||
|
|||||||
Reference in New Issue
Block a user