public void SetMakeItems(IEnumerable <Make> makes) { foreach (var make in makes) { Makes.Add(make); } }
public Make AddMake(Make toAdd, string userId) { var user = Users.Single(u => u.Id == userId); toAdd.UserAddedBy = user; Makes.Add(toAdd); SaveChanges(); return(toAdd); }
public void SetMakes(IEnumerable <VehicleMake> vehicleMake) { foreach (var make in vehicleMake) { Makes.Add(new SelectListItem() { Value = make.VehicleMakeId.ToString(), Text = make.Make }); } }
public void SetMakes(IEnumerable <MakeModel> makes) { foreach (var make in makes) { Makes.Add(new SelectListItem() { Value = make.Make, Text = make.Make }); } }
public void SetMakes(IEnumerable <Makes> makes) { foreach (var m in makes) { Makes.Add(new SelectListItem() { Value = m.MakeId.ToString(), Text = m.Description.ToString() }); } }
public Make AddMake(string makeName, int adminId) { Make newMake = new Make(); newMake.MakeId = Makes.Max(i => i.MakeId) + 1; newMake.MakeName = makeName; newMake.AdminId = adminId; newMake.Created = DateTime.Now; Makes.Add(newMake); (this).SaveChanges(); return(newMake); }
public void SetMakesAndModels(Manager manager) { AllMakes = manager.GetAllMakes(); AllModels = manager.GetAllModels(); foreach (var make in AllMakes) { Makes.Add(new SelectListItem { Text = make.Name, Value = make.Id.ToString() }); } }
private void InitializeMakes() { this.Makes = new List <string>(); Makes.Add("Land Rover"); Makes.Add("Jaguar"); Makes.Add("Mini"); Makes.Add("Porche"); Makes.Add("Volkswagen"); Makes.Add("Audi"); Makes.Add("Toyota"); Makes.Add("Vaxhaul"); Makes.Add("Peugeot"); Makes.Add("Skoda"); Makes.Add("Lexus"); }
public void Copy(MakeCollection response) { Makes.Clear(); foreach (var make in response.Makes) { var eMake = new EdmundsMake(make.Id, make.Name, make.NiceName, make.Manufacturer); foreach (var eModel in make.Models.Select(model => new EdmundsModel(model.Link, model.Id, model.Name))) { eMake.Models.Add(eModel); } Makes.Add(eMake); } }
private void OnAddMake(UserPromptViewModel result) { if (result == null) { return; } if (!string.IsNullOrEmpty(result.FirstInput)) { var make = new TachographMake { Name = result.FirstInput }; Makes.Add(make); Repository.Add(make); } }
private void AddMakeExecute() { Makes.Add(new Make()); }