Beispiel #1
0
        public ActionResult Edit(int id)
        {
            if (id < 1)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Monitor monitor = _monitorService.GetById(id);

            if (monitor == null)
            {
                return(HttpNotFound());
            }
            var users   = _userService.GetList();
            var gruplar = _grupService.GetList();

            ViewBag.GrupId = new SelectList(gruplar, "Id", "Adi", monitor.GrupId);
            var cozunurlukler = _cozunurlukService.GetList();

            ViewBag.CozunurlukId = new SelectList(cozunurlukler.Select(s => new { s.Id, s.Adi }), "Id", "Adi", monitor.CozunurlukId);
            return(View(monitor));
        }