Esempio n. 1
0
        public ActionResult Create()
        {
            var list = _contactTypeService.GetAll().Items;

            this.ViewBag.ContactTypeId = new SelectList(list, "Id", "Description");
            return(View());
        }
Esempio n. 2
0
        // GET: Reservations/Create
        public ActionResult Create(int?page, string sort)
        {
            this.ViewBag.page = page ?? 1;
            this.ViewBag.sort = sort;

            var list = _contactTypeService.GetAll().Items;

            this.ViewBag.ContactTypeId = new SelectList(list, "Id", "Description");

            var reservationDto = new ReservationViewModel();

            return(View(reservationDto));
        }
        // GET: Employee/Create
        public ActionResult Create()
        {
            var ContactTypes = _ContactTypeService.GetAll();

            ViewBag.ContactTypes = ContactTypes.Select(a => new SelectListItem {
                Text = a.ContactType, Value = a.Name.ToString()
            }).AsEnumerable().ToList();
            var Tags = _TagService.GetAll();

            ViewBag.Tags = Tags.Select(a => new SelectListItem {
                Text = a.TagName, Value = a.Id.ToString()
            }).AsEnumerable().ToList();
            return(View());
        }
 public IActionResult GetAll()
 {
     return(Ok(_service.GetAll()));
 }
Esempio n. 5
0
 public IEnumerable <ContactTypeDTO> GetAll()
 {
     return(_service.GetAll());
 }