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 ActionResult Create(Examinee examinee)
 {
     try
     {
         examinee = _iFExaminee.Create(examinee);
         return(View(examinee));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
Ejemplo n.º 3
0
 public ActionResult Create(Examinee examinee)
 {
     Session["ExamineeId"] = null;
     try
     {
         examinee = _iFExaminee.Create(examinee);
         Session["ExamineeId"] = examinee.ExamineeId;
         return(RedirectToAction("SelectExam"));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }
Ejemplo n.º 4
0
 public ActionResult Create(Examinee examinee)
 {
     try
     {
         //delete
         examinee    = _iFExaminee.Create(examinee);
         Session[id] = examinee.ExamineeId;
         return(RedirectToAction("SelectExam", new { id = examinee.ExamineeId }));
     }
     catch (Exception ex)
     {
         return(Json(ex));
     }
 }