Esempio n. 1
0
        /// <summary>
        /// Updates a given Task in the internal database and the server if possible
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        private bool updateTask(Task t)
        {
            bool ret = false;

            if (t.GetType() == typeof(CleaningTask))
            {
                DataBase.UpdateCleaningTask((CleaningTask)t);
                synchMng.UpdateCleaningTask((CleaningTask)t);
                ret = true;
            }
            else if (t.GetType() == typeof(TransportTask))
            {
                DataBase.UpdateTransportTask((TransportTask)t);
                synchMng.UpdateTransportTask((TransportTask)t);
                ret = true;
            }
            else if (t.GetType() == typeof(MaintenanceTask))
            {
                DataBase.UpdateMaintenanceTask((MaintenanceTask)t);
                synchMng.UpdateMaintenanceTask((MaintenanceTask)t);
                ret = true;
            }
            return(ret);
        }