foreach (var sale in salesProgram)
{
var exist = false;
foreach (var selectListItem in partner.SalesPrograms)
{
if (sale.Name == selectListItem.Name)
{
exist = true;
}
}
if (exist)
{
outDto.SalesPrograms.Add(new SelectListItem { Text = sale.Code, Value = sale.Id.ToString() });
}
else
{
outDto.SalesProgramsAll.Add(new SelectListItem { Text = sale.Code, Value = sale.Id.ToString() });
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.