Esempio n. 1
0
        /// <summary>
        /// Unmounts a part from a car.
        /// </summary>
        /// <param name="parameters">A string containing the part id wich will be unmounted.</param>
        public void UnmountPart(string parameters)
        {
            int partId;
            if (!int.TryParse(parameters, out partId))
            {
                throw new ArgumentException("Invalid function parameter. Part Id expected.");
            }

            // Part thePart
            PartServices partSvc = new PartServices();
            Part thePart = partSvc.GetById(partId);

            partSvc.Unmount(thePart);
        }