Пример #1
0
        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);
        }
Пример #2
0
        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);
        }