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