B2019-012: Can remove ‘_UCF’ from end of UCF name and save without it.

This commit is contained in:
Kathy Ruffing 2019-01-22 14:04:38 +00:00
parent ed895209f7
commit b8e250f827

View File

@ -75,6 +75,18 @@ namespace VEPROMS
PG.Refresh();
}
}
else if (SelectedGridField.EndsWith(" Name")) // B2019-012: don't allow removal of '_UCF' from name.
{
if ((string)e.OldValue != MyFormatConfig.Name)
{
if (((string)e.OldValue).EndsWith("_UCF") && !MyFormatConfig.Name.EndsWith("_UCF"))
{
MessageBox.Show(this, "Cannot remove '_UCF' from User Controlled Format name", "UCF Name", MessageBoxButtons.OK);
MyFormatConfig.Name = MyFormatConfig.Name + ("_UCF");
PG.Refresh();
}
}
}
}
private string SelectedGridField = "Identification: Name"; // first field sectioned upon creation of form
void PG_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e)