// // GET: /PhysConn/Details/5 public ViewResult Details(long id) { Guid userID = GetUserID(); saconfig_tPhysConn saconfig_tphysconn = db.saconfig_tPhysConn.Single(s => s.ID == id && s.DataOwnerID == userID); return(View(saconfig_tphysconn)); }
// // GET: /PhysConn/Edit/5 public ActionResult Edit(long id) { Guid userID = GetUserID(); saconfig_tPhysConn saconfig_tphysconn = db.saconfig_tPhysConn.Single(s => s.ID == id && s.DataOwnerID == userID); ViewBag.ConnectedAP = new SelectList(db.saconfig_tConnectedAP.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tphysconn.ConnectedAP); return(View(saconfig_tphysconn)); }
public ActionResult DeleteConfirmed(long id) { Guid userID = GetUserID(); saconfig_tPhysConn saconfig_tphysconn = db.saconfig_tPhysConn.Single(s => s.ID == id && s.DataOwnerID == userID); db.saconfig_tPhysConn.DeleteObject(saconfig_tphysconn); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(saconfig_tPhysConn saconfig_tphysconn) { Guid userID = GetUserID(); if (ModelState.IsValid) { saconfig_tphysconn.DataOwnerID = userID; db.saconfig_tPhysConn.Attach(saconfig_tphysconn); db.ObjectStateManager.ChangeObjectState(saconfig_tphysconn, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ConnectedAP = new SelectList(db.saconfig_tConnectedAP.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tphysconn.ConnectedAP); return(View(saconfig_tphysconn)); }