public ActionResult Upload(HttpPostedFileBase upload) { if (ModelState.IsValid) { if (!CsvService.ParseCsv(upload, (long)Session["pharm_id"])) { ModelState.AddModelError("File", "Error parsing file"); } } return(RefillListView()); }