Ejemplo n.º 1
0
 public List <InitCarViewModel> GetInit()
 {
     carList = new List <InitCarViewModel>();
     for (int i = 0; i < 50; i++)
     {
         InitCarViewModel model = new InitCarViewModel();
         model.ID = i + 1;
         carList.Add(model);
     }
     return(carList);
 }
Ejemplo n.º 2
0
 public void AddNew(InitCarViewModel dbItem, CarViewModel carModel)
 {
     dbItem.ID             = Program.modelList.Max(e => e.ID) + 1; //Autogenerate ID for DB/Table
     dbItem.Colour         = carModel.Colour;
     dbItem.Condition      = carModel.Condition;
     dbItem.Engine         = carModel.Engine;
     dbItem.Model          = carModel.Model;
     dbItem.Transmission   = carModel.Transmission;
     dbItem.InteriorColour = carModel.InteriorColour;
     dbItem.Price          = carModel.Price;
     Program.modelList.Add(dbItem);
 }