public ActionResult Create(string Firstname, string positionName, string firstName, string middleName, string lastName, string referencecode) { try { var examinee = new Examinee { ReferenceCode = referencecode, Lastname = lastName, Firstname = firstName, Middlename = middleName, }; var position = _iFPosition.Read(positionName); if (position.PositionId != 0) { examinee.PositionId = position.PositionId; examinee = _iFExaminee.Create(examinee); Session["ExamineeId"] = null; Session["ExamineeId"] = examinee.ExamineeId; return(RedirectToAction("SelectExam", JsonRequestBehavior.AllowGet)); } else { return(View(examinee)); } } catch (Exception ex) { return(RedirectToAction("Create")); } }
public JsonResult Read() { return(Json(_iFPosition.Read())); }
public ActionResult Edit(int id) { var position = _iFPosition.Read(id); return(View(position)); }