Using GetEnumerable


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 16 Years Ago
Edhy Rijo - 16 Years Ago
Bill Cunnien - 16 Years Ago
                 Good answer, Edhy. :)
Trent L. Taylor - 16 Years Ago
                     You are welcome guys! :)
Edhy Rijo - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search