Merge pull request 'B2026-017 Use Pre-typed in information when adding New Applicability' (#722) from B2026-017 into Development

good for testing phase
This commit was merged in pull request #722.
This commit is contained in:
2026-02-26 15:07:15 -05:00
2 changed files with 26 additions and 5 deletions

View File

@@ -1113,13 +1113,34 @@ namespace VEPROMS
if (_Apples == null)
{
_Apples = new List<MiniConfig>();
}
_Apples.Add(cfg);
}
//B2026-017 Use Pre-typed in information when adding New Applicability
if (_Apples.Count == 0)
{
cfg.ID = textBox1.Text;
if (!string.IsNullOrEmpty(textBox2.Text))
{
cfg.Name = textBox2.Text;
}
cfg.Number = textBox3.Text;
cfg.Text = textBox4.Text;
cfg.OtherID = textBox8.Text;
cfg.OtherName = textBox9.Text;
cfg.OtherNumber = textBox10.Text;
cfg.OtherText = textBox11.Text;
cfg.ProcedureNumber = textBox5.Text;
cfg.SetID = textBox6.Text;
cfg.SetName = textBox7.Text;
}
_Apples.Add(cfg);
bsApples.DataSource = null;
bsApples.DataSource = _Apples;
lbApplicabilities.SelectedItem = cfg;
}
lbApplicabilities.SelectedItem = cfg;
lbApplicabilities_SelectedIndexChanged(sender, e);
}
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
{

View File

@@ -2291,7 +2291,7 @@ OnPropertyChanged("Default_BkColor");
public void RemoveSlave(int index)
{
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
dd.ParentNode.RemoveChild(dd);
dd?.ParentNode?.RemoveChild(dd);
}
public int MaxSlaveIndex
{