Example #1
0
        // GET: Specializations/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (!HomeController.Authorized(this))
            {
                return(RedirectToAction("Login", "Accounts"));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Specialization specialization = db.Specializations.Find(id);

            if (specialization == null)
            {
                return(HttpNotFound());
            }
            ViewBag.jobId = new SelectList(db.Jobs, "id", "name", specialization.jobId);
            return(View(specialization));
        }