I have the following method:
private void cmdApplyAll_Click(object sender, EventArgs e)
{
MessageFunctionType mMft = MessageForm.ShowMessage("Aspire Confirmation", "Are you sure that you want to apply the change to all selected parts?", 1001", MessageFunction.YesNo, MessagingIcon.Question, MessagingSounds.Question);
if (mMft == MessageFunctionType.Yes)
{
waitWindow1.DisplayTitle = true;
waitWindow1.Title = "Updating Parts";
waitWindow1.Message = "Updating the following parts . . . \r";
waitWindow1.ShowWaitWindow();
foreach (PartsBO mBO in partsBO1.GetEnumerable())
{
waitWindow1.Message += mBO.partnum + "\r";
mBO.Edit();
if (chkProdAppend.Checked) { mBO.prodnotes += txtNewNote.Text; }
if (chkProdReplace.Checked) { mBO.prodnotes = txtNewNote.Text; }
if (chkShipAppend.Checked) { mBO.shipnotes += txtNewNote.Text; }
if (chkShipReplace.Checked) { mBO.shipnotes = txtNewNote.Text; }
mBO.Save();
}
waitWindow1.HideWaitWindow();
}
}
The code ends up in an infinite loop after the second trip through the partsBO1 BOs. It keeps repeating the second record. What am I doing wrong?
Thanks!
Bill