コード例 #1
0
 public CarInServiceViewData(CarViewData carViewData, WorkerViewData workerViewData,
                             List <MalfunctionViewData> malfunctionsViewData)
 {
     CarViewData          = carViewData;
     WorkerViewData       = workerViewData;
     MalfunctionsViewData = malfunctionsViewData;
 }
コード例 #2
0
        public RepairOrderViewData(RepairOrder order, ClientViewData clientViewData, CarViewData carViewData,
                                   WorkerViewData workerViewData, List <MalfunctionViewData> malfunctionViewModels)
        {
            Id = order.Id;
            DateOfTheApplication = order.DateOfTheApplication;
            IsReady               = order.IsReady;
            ClientViewData        = clientViewData;
            CarViewData           = carViewData;
            WorkerViewData        = workerViewData;
            MalfunctionViewModels = malfunctionViewModels;

            Price            = MalfunctionViewModels.Sum(m => m.Price);
            DateOfCompletion = DateTime.Now + TimeSpan.FromHours(MalfunctionViewModels.Sum(m => m.TimeToFix) + 12);
        }