public ActionResult SampleDecide(RollerTestreportInfo rollertestreportinfo) { testreportinfoRepo.SaveRollerTestreportInfo(rollertestreportinfo); //return RedirectToAction("SampleDecide", new { RollerSampleInfoID = rollertestreportinfo.RollerSampleInfoID }); //return RedirectToAction("../TestBlock/Index", new { RollerSampleInfoID = rollertestreportinfo.RollerSampleInfoID }); return(RedirectToAction("../TestBlock/Index")); }
public ActionResult EditAfterReport(RollerTestreportInfo rollertestreportinfo) { testreportrepo.SaveRollerTestreportInfo(rollertestreportinfo); Entities context = new Entities(); context.PROCEDURE_ROLLERTESTREPORTINFO(0); context.SaveChanges(); return(RedirectToAction("Index", "TestBlock")); }
public ViewResult SampleDecide(int RollerSampleInfoID) { //SampleDecideViewModel sampledecideviewModel = new SampleDecideViewModel() //{ // rollertestreportinfos = testreportinfoRepo.RollerTestreportInfos.Where(x => x.RollerSampleInfoID == RollerSampleInfoID) //}; RollerTestreportInfo rollertestreportinfo = testreportinfoRepo.RollerTestreportInfos.FirstOrDefault(x => x.RollerSampleInfoID == RollerSampleInfoID); return(View(rollertestreportinfo)); }
public RollerTestreportInfo DeleteRollerTestreportInfo(int rollertestreportinfoID) { RollerTestreportInfo dbEntry = context.RollerTestreportInfos.Find(rollertestreportinfoID); if (dbEntry != null) { context.RollerTestreportInfos.Remove(dbEntry); context.SaveChanges(); } return(dbEntry); }
public void SaveRollerTestreportInfo(RollerTestreportInfo rollertestreportinfo) { if (rollertestreportinfo.RollerTestReportInfoID == 0) { context.RollerTestreportInfos.Add(rollertestreportinfo); } else { RollerTestreportInfo dbEntry = context.RollerTestreportInfos.Find(rollertestreportinfo.RollerTestReportInfoID); if (dbEntry != null) { dbEntry.RollerTestReportInfoID = rollertestreportinfo.RollerTestReportInfoID; dbEntry.RollerSampleInfoID = rollertestreportinfo.RollerSampleInfoID; dbEntry.StartStatus = rollertestreportinfo.StartStatus; dbEntry.StartText = rollertestreportinfo.StartText; dbEntry.EndText = rollertestreportinfo.EndText; dbEntry.EndStatus = rollertestreportinfo.EndStatus; dbEntry.FinalStatus = rollertestreportinfo.FinalStatus; } } context.SaveChanges(); }
public ActionResult AfterTest(int RollerSampleInfoId) { RollerTestreportInfo rollertestreportinfo = testreportrepo.RollerTestreportInfos.FirstOrDefault(x => x.RollerSampleInfoID == RollerSampleInfoId); return(View(rollertestreportinfo)); }
public ActionResult Index(int RollerSampleInfoId) { RollerTestreportInfo rti = testreportrepo.RollerTestreportInfos.FirstOrDefault(x => x.RollerSampleInfoID == RollerSampleInfoId); return(View(rti)); }