// // GET: /DurationInMilliSec/Details/5 public ViewResult Details(long id) { Guid userID = GetUserID(); saconfig_tDurationInMilliSec saconfig_tdurationinmillisec = db.saconfig_tDurationInMilliSec.Single(s => s.ID == id && s.DataOwnerID == userID); return(View(saconfig_tdurationinmillisec)); }
public ActionResult DeleteConfirmed(long id) { Guid userID = GetUserID(); saconfig_tDurationInMilliSec saconfig_tdurationinmillisec = db.saconfig_tDurationInMilliSec.Single(s => s.ID == id && s.DataOwnerID == userID); db.saconfig_tDurationInMilliSec.DeleteObject(saconfig_tdurationinmillisec); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /DurationInMilliSec/Edit/5 public ActionResult Edit(long id) { Guid userID = GetUserID(); saconfig_tDurationInMilliSec saconfig_tdurationinmillisec = db.saconfig_tDurationInMilliSec.Single(s => s.ID == id && s.DataOwnerID == userID); ViewBag.ElementName = new SelectList(db.saconfig_DurationInMilliSecElementName, "ID", "ElementName", saconfig_tdurationinmillisec.ElementName); ViewBag.GSE = new SelectList(db.saconfig_tGSE.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tdurationinmillisec.GSE); ViewBag.unit = new SelectList(db.saconfig_tSIUnitEnum, "ID", "value", saconfig_tdurationinmillisec.unit); ViewBag.multiplier = new SelectList(db.saconfig_tUnitMultiplierEnum, "ID", "value", saconfig_tdurationinmillisec.multiplier); return(View(saconfig_tdurationinmillisec)); }
public ActionResult Edit(saconfig_tDurationInMilliSec saconfig_tdurationinmillisec) { Guid userID = GetUserID(); if (ModelState.IsValid) { saconfig_tdurationinmillisec.DataOwnerID = userID; db.saconfig_tDurationInMilliSec.Attach(saconfig_tdurationinmillisec); db.ObjectStateManager.ChangeObjectState(saconfig_tdurationinmillisec, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ElementName = new SelectList(db.saconfig_DurationInMilliSecElementName, "ID", "ElementName", saconfig_tdurationinmillisec.ElementName); ViewBag.GSE = new SelectList(db.saconfig_tGSE.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tdurationinmillisec.GSE); ViewBag.unit = new SelectList(db.saconfig_tSIUnitEnum, "ID", "value", saconfig_tdurationinmillisec.unit); ViewBag.multiplier = new SelectList(db.saconfig_tUnitMultiplierEnum, "ID", "value", saconfig_tdurationinmillisec.multiplier); return(View(saconfig_tdurationinmillisec)); }