private readonly Window _window; // Hovedvinduet public CreateAdPage(Window window) { InitializeComponent(); _bikeService = new BikeServiceClient(); _window = window; BikeComboBox.ItemsSource = _bikeService.GetBikesByUser(BikenBike.CurrentUser.Id); }
public ActionResult ViewBikes() { var id = Session["ID"]; List <Bicycle> bikes = client.GetBikesByUser(Convert.ToInt32(id)); // BikeDetails bikeViewBag = new BikeDetails // { // bikes = bikes // }; return(View(bikes)); }
private void PopulateBikeview() { var bicycles = service.GetBikesByUser(BikenBike.CurrentUser.Id); if (bicycles != null) { foreach (var bike in bicycles) { BikeListView.Items.Add(bike); } } }
public ActionResult CreateAd() { var id = Session["ID"]; List <Bicycle> b = client.GetBikesByUser(Convert.ToInt32(id)); List <SelectListItem> Bicycles = new List <SelectListItem>(); foreach (var VARIABLE in b) { Bicycles.Add(new SelectListItem { Text = VARIABLE.Year, Value = VARIABLE.ID.ToString() }); } BikeDetails ddBikes = new BikeDetails { Bicycles = Bicycles }; return(View(ddBikes)); }