Beispiel #1
0
 public ActionResult Edit(ENJobExchange.Areas.PartnerPortal.ViewModels.JobPostingViewModel jpvm)
 {
     try
     {
         if (ModelState.IsValid)
         {
             jpvm.EditReferral(jpvm);
         }
         return(RedirectToAction("Index", new { PartnerID = jpvm.jobPosting.PartnerID }));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Create(JobPostingViewModel jpvm)
        {
            try
            {
                // TODO: Add insert logic here

                if (ModelState.IsValid)
                {
                    //LOGIC HERE
                    return RedirectToAction("Index");
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.Message);
                ModelState.AddModelError("", "Unable to save changes.  Try again, and if the problem persist, contact your system administrator.");
            }
            return View(jpvm);
        }
 //
 // GET: /PartnerPortal/JobPosting/Edit/5
 public ActionResult Edit(long JobPostingID)
 {
     var model = new JobPostingViewModel(JobPostingID);
     return View(model);
 }
 //
 // GET: /PartnerPortal/JobPosting/Details/5
 public ActionResult Details(long jobPostingID)
 {
     var model = new JobPostingViewModel(jobPostingID);
     return View(model);
 }