Esempio n. 1
0
        //
        // GET: /Project/Delete/5

        public ActionResult Delete(long id)
        {
            Guid             userID           = GetUserID();
            saconfig_Project saconfig_project = db.saconfig_Project.Single(s => s.ID == id && s.DataOwnerID == userID);

            return(View(saconfig_project));
        }
Esempio n. 2
0
        public ActionResult DeleteConfirmed(long id)
        {
            Guid             userID           = GetUserID();
            saconfig_Project saconfig_project = db.saconfig_Project.Single(s => s.ID == id && s.DataOwnerID == userID);

            db.saconfig_Project.DeleteObject(saconfig_project);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        public ActionResult Edit(saconfig_Project saconfig_project)
        {
            Guid userID = GetUserID();

            if (ModelState.IsValid)
            {
                saconfig_project.DataOwnerID = userID;
                db.saconfig_Project.Attach(saconfig_project);
                db.ObjectStateManager.ChangeObjectState(saconfig_project, EntityState.Modified);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(saconfig_project));
        }
Esempio n. 4
0
        public ActionResult Create(saconfig_Project saconfig_project)
        {
            Guid userID = GetUserID();

            if (ModelState.IsValid)
            {
                saconfig_project.DataOwnerID = userID;
                db.saconfig_Project.AddObject(saconfig_project);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(saconfig_project));
        }