Пример #1
0
        public void DeleteLeak(DateTime ldate)
        {
            Leak found = null;

            foreach (var item in Leaks)
            {
                if (item.CreateDate == ldate)
                {
                    found = item;
                }
            }
            if (found != null)
            {
                Leaks.Remove(found);
                _dataService.SaveLeaks(Leaks);
            }
            else
            {
                Console.WriteLine("Leak date not found!");
            }
        }