예제 #1
0
        private readonly Window _window;                    // Hovedvinduet

        public CreateAdPage(Window window)
        {
            InitializeComponent();
            _bikeService             = new BikeServiceClient();
            _window                  = window;
            BikeComboBox.ItemsSource = _bikeService.GetBikesByUser(BikenBike.CurrentUser.Id);
        }
예제 #2
0
        public ActionResult ViewBikes()
        {
            var            id    = Session["ID"];
            List <Bicycle> bikes = client.GetBikesByUser(Convert.ToInt32(id));

//            BikeDetails bikeViewBag = new BikeDetails
//            {
//                bikes = bikes
//            };

            return(View(bikes));
        }
예제 #3
0
        private void PopulateBikeview()
        {
            var bicycles = service.GetBikesByUser(BikenBike.CurrentUser.Id);

            if (bicycles != null)
            {
                foreach (var bike in bicycles)
                {
                    BikeListView.Items.Add(bike);
                }
            }
        }
예제 #4
0
        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));
        }