C2025-023 - Electronic Procedures - Modifications to PROMS

1. undo changes to store checkbox/textbox in cell grid
2. change to use roid as key for RO listbox items
This commit is contained in:
2025-04-11 10:12:37 -04:00
parent 9fdbdb05f4
commit 8ef08c53b3
6 changed files with 999 additions and 1187 deletions

View File

@@ -160,10 +160,10 @@ namespace Volian.Controls.Library
foreach (KeyValuePair<string, ComboBox> pair in _DicSingleRO)
{
string val = MyConfig.GetValue("EP", pair.Key);
if (val != null && val != "" && int.TryParse(val, out int n))
pair.Value.SelectedValue = n;
if (val != null && val != "")
pair.Value.SelectedValue = val;
else
pair.Value.SelectedValue = -1;
pair.Value.SelectedValue = "";
}
foreach (KeyValuePair<string, ListBoxMulti> pair in _DicMultiRO)
@@ -175,9 +175,8 @@ namespace Volian.Controls.Library
{
var selectedvalues = val.Split(multiseparator.ToCharArray());
foreach (string item in selectedvalues)
if (int.TryParse(item, out int n))
{
string text = ((List<ROListItem>)pair.Value.DataSource).First(x => x.Value == n).Text;
string text = ((List<ROListItem>)pair.Value.DataSource).First(x => x.Value == item).Text;
pair.Value.SetSelected(pair.Value.FindString(text), true);
}
}