Пример #1
0
 private void ServiceStation_RequestDone(object sender, OnServiceEventArgs e)
 {
     if (WorkRequestCodeList.Contains(e.Code))
     {
         WorkRequest workRequest = ServiceStation.GetWorkRequestValues(e.Code);
         PrintToConsole($"Клиент: заявка {workRequest.WorkType} обработана!");
     }
 }
Пример #2
0
        private void Workroom_RequestDone(object sender, OnServiceEventArgs e)
        {
            var request = WorkRequestList
                          .Where(x => x.Code.Equals(e.Code)).Single();

            request.IsDone();
            //
            Console.WriteLine($"СТО: {e.WorkType}, заявка {e.Code} обработана!");
            //
            RequestDone?.Invoke(this, new OnServiceEventArgs(e.WorkType, e.Code));

            //Проверка на выполнение всех работ
            if (!WorkRequestList
                .Any(x => x.RequestStatus == RequestStatus.IsActive && x.Vehicle.Equals(request.Vehicle)))
            {
                WorkDone?.Invoke(request.Vehicle);
            }
        }