public ActionResult AddTrailVisit(TrialVisit trialVisit)
        {
            if (trialVisit != null && ModelState.IsValid)
            {
                DataProvider.Add(trialVisit);
            }

            return GetProceduresEditor(trialVisit.TrialCode, trialVisit.TrialVersion);
        }
        public ActionResult DeleteTrailVisit(TrialVisit trialVisit)
        {
            DataProvider.Delete(trialVisit);

            return GetProceduresEditor(trialVisit.TrialCode, trialVisit.TrialVersion);
        }
        public ActionResult GetVisitEditor(int? id, string trialCode, int trialVersion)
        {
            TrialVisit visit;
            if (id.HasValue)
            {
                visit = DataProvider.GetItem(new TrialVisitDataFilter { Id = id });
                if (visit == null)
                    throw new ApplicationException("Визит не найден");
                ViewBag.IsNew = false;
            }
            else
            {
                visit = new TrialVisit { TrialCode = trialCode, TrialVersion = trialVersion };
                ViewBag.IsNew = true;
            }

            return PartialView("EditorTemplates/VisitEditor", visit);
        }