private void LoadBedTypeData() { BedTypes oTypes = new BedTypes(); cboBedType.DataBindings.Clear(); m_oDS = oTypes.GetData(); cboBedType.DataSource = m_oDS.Tables["BedType"]; cboBedType.DisplayMember = "BedType"; cboBedType.ValueMember = "BedType"; cboBedType.SelectedValue = "Ward"; }
private Expression <Func <VehicleToBedConfigDocument, bool> > AddBedTypeFilter( Expression <Func <VehicleToBedConfigDocument, bool> > filterEx) { if (BedTypes == null || !BedTypes.Any()) { return(filterEx); } Expression <Func <VehicleToBedConfigDocument, bool> > bedTypeFilterEx = null; foreach (var bedType in BedTypes) { bedTypeFilterEx = bedTypeFilterEx.OrElse(x => x.BedTypeName == bedType); } return(filterEx.AndAlso(bedTypeFilterEx)); }