Ejemplo n.º 1
0
        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"));
            }
        }
Ejemplo n.º 2
0
 public JsonResult Read()
 {
     return(Json(_iFPosition.Read()));
 }
        public ActionResult Edit(int id)
        {
            var position = _iFPosition.Read(id);

            return(View(position));
        }