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

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

            return(View(saconfig_tdo));
        }
Beispiel #2
0
        //
        // GET: /DO/Edit/5

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

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

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

            if (ModelState.IsValid)
            {
                saconfig_tdo.DataOwnerID = userID;
                db.saconfig_tDO.Attach(saconfig_tdo);
                db.ObjectStateManager.ChangeObjectState(saconfig_tdo, EntityState.Modified);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.LNodeType = new SelectList(db.saconfig_tLNodeType.Where(t => t.DataOwnerID == userID).ToList(), "ID_", "desc", saconfig_tdo.LNodeType);
            return(View(saconfig_tdo));
        }