public void DeleteRecordFromRepo(LandingSite ls)
        {
            if (ls == null)
            {
                throw new Exception("Landing site cannot be null");
            }

            int index = 0;

            while (index < LandingSiteCollection.Count)
            {
                if (LandingSiteCollection[index].ID == ls.ID)
                {
                    LandingSiteCollection.RemoveAt(index);
                    break;
                }
                index++;
            }
        }
예제 #2
0
        public void DeleteRecordFromRepo(string id)
        {
            if (id == null)
            {
                throw new Exception("Record ID cannot be null");
            }

            int index = 0;

            while (index < LandingSiteCollection.Count)
            {
                if (LandingSiteCollection[index].LandingSiteID == id)
                {
                    LandingSiteCollection.RemoveAt(index);
                    break;
                }
                index++;
            }
        }