예제 #1
0
        public ActionResult AddJob(EmploymentsViewModel cVM)
        {
            if (ModelState.IsValid)
            {
                //Person p = Session["Person"] as Person;

                if (hrServices.AddNewPersonJob(cVM, cVM.Id))
                {
                    ViewBag.Message = "Pomyślnie dodano miejsce zatrudnienia";
                    return(RedirectToAction("DisplaySuccessOfAddWorker"));
                }
                else
                {
                    ModelState.AddModelError("", "Nieznany blad");
                    return(View("DisplaySuccessOfAddWorker"));
                }
            }
            else
            {
            }

            return(View());
        }