public bool HasUnitBeenDispatched(int unitId) { if (UnitDispatches != null && UnitDispatches.Any()) { var dispatch = from d in UnitDispatches where d.UnitId == unitId select d; if (dispatch != null && dispatch.Any()) { return(true); } } return(false); }
public bool HasAnyDispatches() { if (Dispatches != null && Dispatches.Any()) { return(true); } if (GroupDispatches != null && GroupDispatches.Any()) { return(true); } if (UnitDispatches != null && UnitDispatches.Any()) { return(true); } if (RoleDispatches != null && RoleDispatches.Any()) { return(true); } return(false); }