Beispiel #1
0
        public ActionResult Detail(string licencePlate)
        {
            CarDTO            car      = carLogic.Get(licencePlate);
            CarModelDTO       carModel = carModelLogic.Get(car.id_Car_Model);
            CarMakeDTO        carMake  = carMakeLogic.Get(carModel.id_Car_Make);
            List <BookingDTO> bookings = bookingLogic.List(car.Licence_Plate);
            List <EventDTO>   events   = eventLogic.List(licencePlate);


            CarDetailViewsModel vm = new CarDetailViewsModel
            {
                car      = car,
                carModel = carModel,
                carMake  = carMake,
                events   = events
            };

            return(View(vm));
        }
        public void Load()
        {
            var responce = CarLogic.Get(_Id);

            if (responce.IsCompleted && responce.Object != null)
            {
                tbCarMake.Text           = responce.Object.Make;
                tbCompanyName.Text       = responce.Object.Model;
                tbCarRegistrationNo.Text = responce.Object.RegistrationNo;
            }

            //if(updateCar.CarOwner == "Own")
            //{
            //    cbCarOwnerOwn.IsChecked = true;
            //}
            //else if(updateCar.CarOwner == "Investor")
            //{
            //    cbCarOwnerInvestor.IsChecked = true;
            //}
            //else
            //{
            //    cbCarOwnerNonPool.IsChecked = true;
            //}

            //if(updateCar.CarFuelState =="Full")
            //{
            //    cbCarFuelStateFull.IsChecked = true;
            //}
            //else if(updateCar.CarFuelState == "Quarter")
            //{
            //    cbCarFuelStateQuarter.IsChecked = true;
            //}
            //else if(updateCar.CarFuelState == "Half")
            //{
            //    cbCarFuelStateHalf.IsChecked = true;
            //}
            //else
            //{
            //    cbCarFuelStateEmpty.IsChecked = true;

            //}
        }