Exemple #1
0
        /// <summary>
        /// Change of state. If the position is available we
        /// change state on 'during repair' and substract one position.
        /// </summary>
        /// <returns>true, if the process of 'taking' car to workshop succeed</returns>
        public static bool ChangeState()
        {
            bool ap = Workshop.CheckAvaileblePosition();

            if (ap == true)
            {
                bool c = OfficeList.Finding();
                if (c == true)
                {
                    Workshop.MinusPosition();
                    return(true);
                }
                else
                {
                    Console.WriteLine("There isn't the order with RepairState 'before repair'.");
                    return(false);
                }
            }
            else
            {
                Console.WriteLine("There isn't availble position.");
                return(false);
            }
        }