Update related lists when related value changes.
This commit is contained in:
@@ -224,8 +224,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(Annotation tmp)
|
||||
{
|
||||
_ItemID = tmp.ItemID;
|
||||
_TypeID = tmp.TypeID;
|
||||
if (_ItemID != tmp.ItemID)
|
||||
{
|
||||
MyItem.RefreshItemAnnotations(); // Update List for old value
|
||||
_ItemID = tmp.ItemID; // Update the value
|
||||
_MyItem = null; // Reset list so that the next line gets a new list
|
||||
MyItem.RefreshItemAnnotations(); // Update List for new value
|
||||
}
|
||||
if (_TypeID != tmp.TypeID)
|
||||
{
|
||||
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for old value
|
||||
_TypeID = tmp.TypeID; // Update the value
|
||||
_MyAnnotationType = null; // Reset list so that the next line gets a new list
|
||||
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for new value
|
||||
}
|
||||
_RtfText = tmp.RtfText;
|
||||
_SearchText = tmp.SearchText;
|
||||
_Config = tmp.Config;
|
||||
@@ -244,7 +256,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(AnnotationTypeAnnotation tmp)
|
||||
{
|
||||
_ItemID = tmp.ItemID;
|
||||
if (_ItemID != tmp.ItemID)
|
||||
{
|
||||
MyItem.RefreshItemAnnotations(); // Update List for old value
|
||||
_ItemID = tmp.ItemID; // Update the value
|
||||
_MyItem = null; // Reset list so that the next line gets a new list
|
||||
MyItem.RefreshItemAnnotations(); // Update List for new value
|
||||
}
|
||||
_RtfText = tmp.RtfText;
|
||||
_SearchText = tmp.SearchText;
|
||||
_Config = tmp.Config;
|
||||
@@ -263,7 +281,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(ItemAnnotation tmp)
|
||||
{
|
||||
_TypeID = tmp.TypeID;
|
||||
if (_TypeID != tmp.TypeID)
|
||||
{
|
||||
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for old value
|
||||
_TypeID = tmp.TypeID; // Update the value
|
||||
_MyAnnotationType = null; // Reset list so that the next line gets a new list
|
||||
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for new value
|
||||
}
|
||||
_RtfText = tmp.RtfText;
|
||||
_SearchText = tmp.SearchText;
|
||||
_Config = tmp.Config;
|
||||
|
Reference in New Issue
Block a user