public ActionResult AddDocument(Document doc, HttpPostedFileBase File) { if (ModelState.IsValid) { doc.Content = HR.Web_UI.Services.FileToByte.ConvertFileToByte(File); if (hrServices.SaveDocument(doc)) { return(RedirectToAction("DisplayListOfWorkers")); } else { ModelState.AddModelError("", "Nieznany blad"); return(View("DisplayListOfWorkers")); } } return(View()); }