B2019-048: fixed crashes on approval dialog
This commit is contained in:
parent
5d6bfe1c45
commit
abb89cc757
@ -11,6 +11,7 @@ using Volian.Print.Library;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using DevComponents.DotNetBar;
|
||||
using JR.Utils.GUI.Forms;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
@ -219,6 +220,10 @@ namespace VEPROMS
|
||||
{
|
||||
if (key.Contains(" Checked out to "))
|
||||
key = key.Substring(0, key.IndexOf(" Checked out to "));
|
||||
// B2019-048: after running consistency check - inconsistency text was added to string in dialog. Remove that text
|
||||
// if in key so that it can be used to find procedure in procedure list (was crashing):
|
||||
if (key.Contains(" - ("))
|
||||
key = key.Substring(0, key.LastIndexOf(" - ("));
|
||||
if (tmpProcedures.ContainsKey(key))
|
||||
return tmpProcedures[key];
|
||||
else
|
||||
@ -402,6 +407,12 @@ namespace VEPROMS
|
||||
for (int i = 0; i < clbMore.Items.Count; i++)
|
||||
if (clbMore.GetItemChecked(i))
|
||||
myProcs.Add(GetProcedureInfoByKey(clbMore.Items[i].ToString()));
|
||||
// B2019-048: if no procedures are checked in procedure list dialog, just tell user - don't crash:
|
||||
if (myProcs.Count == 0)
|
||||
{
|
||||
FlexibleMessageBox.Show("No procedures are selected, you must select at least one procedure.", "No Procedures Selected", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
pbMore.Maximum = myProcs.Count;
|
||||
_MyItemInfoList = ItemInfoList.GetMoreProcedures(myProcs);
|
||||
ItemInfoList.ConsistencyCheckUpdated -= new ItemInfoListCCEvent(ItemInfoList_ConsistencyCheckUpdated);
|
||||
|
Loading…
x
Reference in New Issue
Block a user