public ActionResult GetByPeriod(string start, string end, int factoryId) { try { var stat = StatManager.ByPeriod(start, end, factoryId); if (stat != null) { return(View("~/Views/Stat/_ByPeriod.cshtml", stat)); } else { throw new Exception("Нет смен в указанном периоде"); } } catch (Exception) { return(RedirectToAction("ShiftError", "Error")); } }