Ejemplo n.º 1
0
 /// <summary>
 /// Change all parameters of the car based on input Car data. Returns updated object
 /// </summary>
 public void ChangeCarsParameters(Car inputCar)
 {
     Brand = inputCar.Brand;
     Model = inputCar.Model;
     SetEngine(inputCar.GetEngine());
     LicensePlateNo = inputCar.LicensePlateNo;
     ProductionDate = inputCar.ProductionDate;
     SetPurchaseDate(inputCar.GetPurchaseDate());
     SetVin(inputCar.GetVin());
     SetCounterState(inputCar.GetCounterState());
 }
Ejemplo n.º 2
0
        private void PopulatePanelEditCar(Car toEdit)
        {
            tbEditBrand.Text          = toEdit.Brand.ToString();
            tbEditModel.Text          = toEdit.Model.ToString();
            dtpEditPurchaseDate.Value = toEdit.PurchaseDate;
            tbEditPY.Text             = toEdit.ProductionDate.Year.ToString();
            tbEditLicensePlate.Text   = toEdit.LicensePlateNo.ToString();
            tbEditVIN.Text            = toEdit.GetVin();
            tbEditBodyType.Text       = toEdit.BodyType.ToString();

            Engine fromToEdit = toEdit.GetEngine();

            tbEditEngineType.Text = fromToEdit.TypeOfEngine;
            tbEditCapacity.Text   = fromToEdit.Capacity.ToString();
            tbEditPowerHP.Text    = fromToEdit.Horsepower.ToString();
            tbEditPowerkW.Text    = fromToEdit.PowerInKw.ToString();
        }
Ejemplo n.º 3
0
        private void MenagePanelCarDetails(Car show)
        {
            tbDBrand.Text          = show.Brand.ToString();
            tbDModel.Text          = show.Model.ToString();
            tbDProductionYear.Text = show.ProductionDate.Year.ToString();
            tbDPurchaseYear.Text   = show.GetPurchaseDate().ToString();
            tbDLicencePlateNo.Text = show.LicensePlateNo.ToString();
            tbDVIN.Text            = show.GetVin();
            tbDBodyType.Text       = show.BodyType.ToString();

            Engine fromShow = show.GetEngine();

            tbDEngineType.Text = fromShow.TypeOfEngine;
            tbDCapacity.Text   = fromShow.Capacity.ToString();
            tbDPowerHP.Text    = fromShow.Horsepower.ToString();
            tbDPowerkW.Text    = fromShow.PowerInKw.ToString();
        }