private void MapSchemesToStructure() { if (rlbMappedSchemes.Items.Count < 1) { return; } List <int> schemeIds = new List <int>(); bool mapOk = true; int structId = int.Parse(hdnStructId.Value); foreach (RadListBoxItem item in rlbMappedSchemes.Items) { int schemeId = int.Parse(item.Value); if (commisionReceivableBo.checkSchemeAssociationExists(schemeId, structId, rdpMappedFrom.SelectedDate.Value, rdpMappedTill.SelectedDate.Value, "")) { mapOk = false; break; } } if (!mapOk) { showMapError(); return; } foreach (RadListBoxItem item in rlbMappedSchemes.Items) { commisionReceivableBo.MapSchemesToStructres(structId, int.Parse(item.Value), rdpMappedFrom.SelectedDate.Value, rdpMappedTill.SelectedDate.Value); } }