// // GET: /Project/Delete/5 public ActionResult Delete(long id) { Guid userID = GetUserID(); saconfig_Project saconfig_project = db.saconfig_Project.Single(s => s.ID == id && s.DataOwnerID == userID); return(View(saconfig_project)); }
public ActionResult DeleteConfirmed(long id) { Guid userID = GetUserID(); saconfig_Project saconfig_project = db.saconfig_Project.Single(s => s.ID == id && s.DataOwnerID == userID); db.saconfig_Project.DeleteObject(saconfig_project); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(saconfig_Project saconfig_project) { Guid userID = GetUserID(); if (ModelState.IsValid) { saconfig_project.DataOwnerID = userID; db.saconfig_Project.Attach(saconfig_project); db.ObjectStateManager.ChangeObjectState(saconfig_project, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(saconfig_project)); }
public ActionResult Create(saconfig_Project saconfig_project) { Guid userID = GetUserID(); if (ModelState.IsValid) { saconfig_project.DataOwnerID = userID; db.saconfig_Project.AddObject(saconfig_project); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(saconfig_project)); }