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

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

            return(View(saconfig_authentication));
        }
Beispiel #2
0
        //
        // GET: /Authentication/Edit/5

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

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

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

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