Example #1
0
        //GET DETAILS by ID
        public ActionResult Details(int id)
        {
            var service = new SessionTypeService();
            var model   = service.GetSessionTypeByID(id);

            return(View(model));
        }
Example #2
0
        //Edit by Id
        public ActionResult Edit(int id)
        {
            var service = new SessionTypeService();
            var detail  = service.GetSessionTypeByID(id);

            var model = new SessionTypeEdit
            {
                SessionTypeID = detail.SessionTypeID,
                Name          = detail.Name,
                PricePerHour  = detail.PricePerHour
            };

            var sessionService  = new SessionTypeService();
            var sessionTypeList = sessionService.GetSessionTypes();

            ViewBag.SessionTypeID = new SelectList(sessionTypeList, "SessionTypeID", "Name", model.SessionTypeID);

            return(View(model));
        }