public ActionResult AssignInvestigatorToTrial(AssignInvestigatorToTrialViewModel m) { var trialInvestigator = new PX_Model.Trial_Investigator(); trialInvestigator.Investigator_Id = m.InvestigatorId; trialInvestigator.Trial_Id = m.TrialId; trialInvestigator.Type = m.Type; _db.Trial_Investigator.Add(trialInvestigator); _db.SaveChanges(); return View("Index"); }
public ActionResult AssignInvestigatorToTrial(AssignInvestigatorToTrialViewModel m) { //Create trial investigator object and add that to the database var trialInvestigator = new PX_Model.Trial_Investigator(); trialInvestigator.Investigator_Id = m.InvestigatorId; trialInvestigator.Trial_Id = m.TrialId; trialInvestigator.Type = m.Type; _db.Trial_Investigator.Add(trialInvestigator); _db.SaveChanges(); return View("Index"); }