Beispiel #1
0
        // GET: ReservationTypeController/Details/5
        public ActionResult Details(int id)
        {
            if (!_repo.IsExist(id))
            {
                return(NotFound());
            }
            var AbsenceType = _repo.GetById(id);
            var model       = new ReservationTypeViewModel
            {
                Id     = AbsenceType.Id,
                Name   = AbsenceType.Name,
                Number = AbsenceType.Number
            };

            return(View(model));
        }
Beispiel #2
0
        // GET: ReservationType/Edit/5
        public ActionResult Edit(int id)
        {
            if (!_repo.IsExist(id))
            {
                return(NotFound());
            }
            var AbsenceType = _repo.GetById(id);
            var model       = new ReservationType
            {
                Id           = AbsenceType.Id,
                NameType     = AbsenceType.NameType,
                AccessNumber = AbsenceType.AccessNumber
            };

            return(View(model));
        }