C2025-023 - Electronic Procedures - Modifications to PROMS - checkin #2
This commit is contained in:
@@ -316,10 +316,10 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
|
||||
//return a list of items based on the ROsource specified in the EPFormat File
|
||||
public Dictionary<int, string> getROList(AnnotationInfo currAnn)
|
||||
public List<ROListItem> getROList(AnnotationInfo currAnn, bool includeblank)
|
||||
{
|
||||
if (string.IsNullOrEmpty(rosource))
|
||||
return new Dictionary<int, string>();
|
||||
return new List<ROListItem>();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -329,8 +329,11 @@ namespace VEPROMS.CSLA.Library
|
||||
string roid = FormatRoidKey(rosource, false);
|
||||
rochild[] children = lookup.GetRoChildrenByRoid(roid);
|
||||
|
||||
|
||||
return children.Select(x => new { x.ID, x.title }).ToDictionary(t => t.ID, t => t.title);
|
||||
List<ROListItem> mylist = children.Select(x => new ROListItem(x.title, x.ID)).ToList();
|
||||
if (includeblank)
|
||||
mylist.Insert(0, new ROListItem("", -1));
|
||||
|
||||
return mylist;
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
@@ -339,5 +342,18 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
//C2025-023 - Electronic Procedures - Modifications to PROMS
|
||||
// class to handle return of RO Lists
|
||||
#region EPFormatFiles
|
||||
public class ROListItem
|
||||
{
|
||||
public string Text { get; private set; }
|
||||
public int Value { get; private set; }
|
||||
public ROListItem(string _text, int _value)
|
||||
{
|
||||
Text = _text; Value = _value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user