Beispiel #1
0
        public PublishHouseInformation FindByName(string name)
        {
            if (name == null)
            {
                throw new System.ArgumentNullException(nameof(name));
            }

            PublishHouseInformation publishHouseInformation = null;
            PublishingHouse         publishingHouse         = PublishingHouses.FindByName(name);

            if (publishingHouse != null)
            {
                publishHouseInformation = new PublishHouseInformation()
                {
                    Category = publishingHouse.category,
                    Location = publishingHouse.location,
                    Name     = publishingHouse.name
                };
            }

            return(publishHouseInformation);
        }
Beispiel #2
0
        public void Delete(PublishHouseInformation publishHouse)
        {
            if (publishHouse == null)
            {
                throw new System.ArgumentNullException(nameof(publishHouse));
            }

            try
            {
                PublishingHouses.Delete(new PublishingHouse()
                {
                    category = publishHouse.Category,
                    location = publishHouse.Location,
                    name     = publishHouse.Name
                });

                OnOperationExecute(true);
            }
            catch
            {
                OnOperationExecute(false);
            }
        }