public List <Part> GetReservedParts(PartRepository partRepository)
        {
            List <Part> result = new List <Part>();

            foreach (var part in partRepository.Retrieve())
            {
                if (CheckOrPartIsReserved(part))
                {
                    result.Add(part);
                }
            }

            return(result);
        }
        public void CloseOrder(Int64 orderId, PartRepository partRepository)
        {
            foreach (var order in _orders)
            {
                if (orderId == order.Id)
                {
                    foreach (var part in order.Parts)
                    {
                        partRepository.RemovePart(part.Id);
                    }

                    order.Status = "Closed";
                }
            }
        }