Ejemplo n.º 1
0
        // GET: HairService
        public ActionResult Index()
        {
            var userID  = User.Identity.GetUserId();
            var service = new HairServiceService(userID);
            var model   = service.GetHairServices();

            return(View(model));
        }
Ejemplo n.º 2
0
        private List <SelectListItem> GetHairServiceNames()
        {
            var service = new HairServiceService(User.Identity.GetUserId());
            List <SelectListItem> hairServices = new List <SelectListItem>();

            foreach (var hairService in service.GetHairServices())
            {
                hairServices.Add(
                    new SelectListItem
                {
                    Text = hairService.Name
                           //Value = hairService.HairServiceID.ToString()
                });
            }
            return(hairServices);
        }