Beispiel #1
0
        //
        // GET: /ConnectivityNode/Details/5

        public ViewResult Details(long id)
        {
            Guid userID = GetUserID();
            saconfig_tConnectivityNode saconfig_tconnectivitynode = db.saconfig_tConnectivityNode.Single(s => s.ID == id && s.DataOwnerID == userID);

            return(View(saconfig_tconnectivitynode));
        }
Beispiel #2
0
        //
        // GET: /ConnectivityNode/Edit/5

        public ActionResult Edit(long id)
        {
            Guid userID = GetUserID();
            saconfig_tConnectivityNode saconfig_tconnectivitynode = db.saconfig_tConnectivityNode.Single(s => s.ID == id && s.DataOwnerID == userID);

            ViewBag.Bay = new SelectList(db.saconfig_tBay.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tconnectivitynode.Bay);
            return(View(saconfig_tconnectivitynode));
        }
Beispiel #3
0
        public ActionResult DeleteConfirmed(long id)
        {
            Guid userID = GetUserID();
            saconfig_tConnectivityNode saconfig_tconnectivitynode = db.saconfig_tConnectivityNode.Single(s => s.ID == id && s.DataOwnerID == userID);

            db.saconfig_tConnectivityNode.DeleteObject(saconfig_tconnectivitynode);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
        public ActionResult Edit(saconfig_tConnectivityNode saconfig_tconnectivitynode)
        {
            Guid userID = GetUserID();

            if (ModelState.IsValid)
            {
                saconfig_tconnectivitynode.DataOwnerID = userID;
                db.saconfig_tConnectivityNode.Attach(saconfig_tconnectivitynode);
                db.ObjectStateManager.ChangeObjectState(saconfig_tconnectivitynode, EntityState.Modified);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.Bay = new SelectList(db.saconfig_tBay.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tconnectivitynode.Bay);
            return(View(saconfig_tconnectivitynode));
        }