public void AddProtocolResult(ArchivedProtocolResultW aprotocolResult) { aprotocolResult.Id = Guid.NewGuid(); Db.ArchivedProtocolResults.Add(aprotocolResult.ToBase()); Db.SaveChanges(); }
public void EditProtocolResult(ArchivedProtocolResultW aprotocolResult) { var protocolResult = Db.ArchivedProtocolResults.Single(apr => apr.Id == aprotocolResult.Id); protocolResult.ResultNumber = aprotocolResult.ResultNumber; protocolResult.Results = aprotocolResult.Results; Db.SaveChanges(); }
public ActionResult EditProtocolResult(ArchivedProtocolResultW aprotocolResult) { if (ModelState.IsValid) { _rep.EditProtocolResult(aprotocolResult); return(RedirectToAction("ProtocolResultsIndex", new { aproductTestId = aprotocolResult.ArchivedProductTestId })); } return(View(aprotocolResult)); }