I want to pass my listbox items down to my business layer.
//From Save click event
var toBusiness = new List<string>();
foreach (var item in lbProducts.Items)
{
toBusiness.Add(item.ToString());
}
Is this the way to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would thing that the items came from the business layer, correct? So you just need to pass something to the business layer that is non-gui that allows the business layer to recognise them. If your item has a unique ID then you could just pass a List or array of the unique ID, otherwise just pass an array of the items.
or