// // GET: /ServiceConfReportControl/Details/5 public ViewResult Details(long id) { Guid userID = GetUserID(); saconfig_tServiceConfReportControl saconfig_tserviceconfreportcontrol = db.saconfig_tServiceConfReportControl.Single(s => s.ID == id && s.DataOwnerID == userID); return(View(saconfig_tserviceconfreportcontrol)); }
public ActionResult DeleteConfirmed(long id) { Guid userID = GetUserID(); saconfig_tServiceConfReportControl saconfig_tserviceconfreportcontrol = db.saconfig_tServiceConfReportControl.Single(s => s.ID == id && s.DataOwnerID == userID); db.saconfig_tServiceConfReportControl.DeleteObject(saconfig_tserviceconfreportcontrol); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /ServiceConfReportControl/Edit/5 public ActionResult Edit(long id) { Guid userID = GetUserID(); saconfig_tServiceConfReportControl saconfig_tserviceconfreportcontrol = db.saconfig_tServiceConfReportControl.Single(s => s.ID == id && s.DataOwnerID == userID); ViewBag.bufMode = new SelectList(db.saconfig_tServiceConfReportControlBufModeEnum, "ID", "value", saconfig_tserviceconfreportcontrol.bufMode); ViewBag.ElementName = new SelectList(db.saconfig_tServiceConfReportControlElementName, "ID", "ElementName", saconfig_tserviceconfreportcontrol.ElementName); ViewBag.Services = new SelectList(db.saconfig_tServices.Where(t => t.DataOwnerID == userID).ToList(), "ID", "ID", saconfig_tserviceconfreportcontrol.Services); return(View(saconfig_tserviceconfreportcontrol)); }
public ActionResult Edit(saconfig_tServiceConfReportControl saconfig_tserviceconfreportcontrol) { Guid userID = GetUserID(); if (ModelState.IsValid) { saconfig_tserviceconfreportcontrol.DataOwnerID = userID; db.saconfig_tServiceConfReportControl.Attach(saconfig_tserviceconfreportcontrol); db.ObjectStateManager.ChangeObjectState(saconfig_tserviceconfreportcontrol, EntityState.Modified); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.bufMode = new SelectList(db.saconfig_tServiceConfReportControlBufModeEnum, "ID", "value", saconfig_tserviceconfreportcontrol.bufMode); ViewBag.ElementName = new SelectList(db.saconfig_tServiceConfReportControlElementName, "ID", "ElementName", saconfig_tserviceconfreportcontrol.ElementName); ViewBag.Services = new SelectList(db.saconfig_tServices.Where(t => t.DataOwnerID == userID).ToList(), "ID", "ID", saconfig_tserviceconfreportcontrol.Services); return(View(saconfig_tserviceconfreportcontrol)); }