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

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

            return(View(saconfig_tinputs));
        }
Beispiel #2
0
        public ActionResult DeleteConfirmed(long id)
        {
            Guid             userID           = GetUserID();
            saconfig_tInputs saconfig_tinputs = db.saconfig_tInputs.Single(s => s.ID == id && s.DataOwnerID == userID);

            db.saconfig_tInputs.DeleteObject(saconfig_tinputs);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #3
0
        //
        // GET: /Inputs/Edit/5

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

            ViewBag.OwnerType = new SelectList(db.saconfig_InputsOwnerType, "ID", "OwnerType", saconfig_tinputs.OwnerType);
            ViewBag.LN        = new SelectList(db.saconfig_tLN.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tinputs.LN);
            ViewBag.LN0       = new SelectList(db.saconfig_tLN0.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tinputs.LN0);
            return(View(saconfig_tinputs));
        }
Beispiel #4
0
        public ActionResult Edit(saconfig_tInputs saconfig_tinputs)
        {
            Guid userID = GetUserID();

            if (ModelState.IsValid)
            {
                saconfig_tinputs.DataOwnerID = userID;
                db.saconfig_tInputs.Attach(saconfig_tinputs);
                db.ObjectStateManager.ChangeObjectState(saconfig_tinputs, EntityState.Modified);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.OwnerType = new SelectList(db.saconfig_InputsOwnerType, "ID", "OwnerType", saconfig_tinputs.OwnerType);
            ViewBag.LN        = new SelectList(db.saconfig_tLN.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tinputs.LN);
            ViewBag.LN0       = new SelectList(db.saconfig_tLN0.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tinputs.LN0);
            return(View(saconfig_tinputs));
        }