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");
        }
        public ActionResult AssignInvestigatorToTrial()
        {
            var m = new AssignInvestigatorToTrialViewModel();

            m.Investigators = _db.Investigators.OrderBy(i => i.Person.First_Name).ToArray();
            m.Trials = _db.Trials.OrderBy(t => t.Name).ToArray();

            return View(m);
        }
        //Show the form to assign investigator to trial
        public ActionResult AssignInvestigatorToTrial()
        {
            //Get the lists of investigator and trial, and send it off to the view
            var m = new AssignInvestigatorToTrialViewModel();

            m.Investigators = _db.Investigators.OrderBy(i => i.Person.First_Name).ToArray();
            m.Trials = _db.Trials.OrderBy(t => t.Name).ToArray();

            return View(m);
        }