Beispiel #1
0
 public ActionResult AddPromotialMaterial(PromotialMaterial prom)
 {
     if (ModelState.IsValid)
     {
         //Person p = Session["Person"] as Person;
         prom.Person = hrServices.GetWorker(CurrentUser == null ? 6 : CurrentUser.PersonId);
         if (hrServices.AddPromotialMaterial(prom))
         {
             return(RedirectToAction("DisplayPromotialMaterials"));
         }
         else
         {
             ModelState.AddModelError("", "Nieznany blad");
             return(View("DisplayPromotialMaterials"));
         }
     }
     else
     {
     }
     return(View());
 }