예제 #1
0
        public ActionResult RemoveApplication(int id)
        {
            var repo = new ApplicantDatabase();
            repo.Delete(id);

            return RedirectToAction("ViewApplicant");
        }
예제 #2
0
        public ActionResult EditForm(int id)
        {
            Application application = new Application();
            ApplicantDatabase ad = new ApplicantDatabase();

            application = ad.GetById(id);

            return View(application);
        }
예제 #3
0
        public ActionResult Index(Application application)
        {
            if (ModelState.IsValid)
            {

                var repo = new ApplicantDatabase();
                repo.Add(application);

                return RedirectToAction("ThankYou");
            }

            return View(application);
        }
예제 #4
0
        public ActionResult EditForm(Application application)
        {
            if (ModelState.IsValid)
            {

                var repo = new ApplicantDatabase();
                repo.Edit(application);

                return RedirectToAction("ViewApplicant");
            }

            return View(application);
        }
예제 #5
0
        public ActionResult Form(Application application)
        {
            if (ModelState.IsValid)
            {

                var repo = new ApplicantDatabase();
                repo.Add(application);

               // string name = application.Name;

                return RedirectToAction("ThankYou", application);
            }

            return View(application);
        }
예제 #6
0
        public ActionResult ViewDetails(int id)
        {
            var repo = new ApplicantDatabase();
            var applicant = repo.GetById(id);

            return View(applicant);
        }
예제 #7
0
        public ActionResult ViewApplicant()
        {
            var repo = new ApplicantDatabase();
            var applicants = repo.GetAll();

            return View(applicants);
        }
예제 #8
0
        public JsonResult ViewDetailsJH(string id)
        {
            var repo = new ApplicantDatabase();
            var applicant = repo.GetById(int.Parse(id));

            return Json(applicant, JsonRequestBehavior.AllowGet);
        }