public ActionResult NewDrug(DrugNewViewModel model) { if (ModelState.IsValid) if (model.Add(provider)) { DiagnosisDrugsViewModel listModel = new DiagnosisDrugsViewModel(model.DiagnosisId, provider); return PartialView("DrugsListPartial", listModel); } return PartialView(model); }
public ActionResult DrugsListPartial(int id) { DiagnosisDrugsViewModel model = new DiagnosisDrugsViewModel(id, provider); return PartialView(model); }