//
        // GET: /ClientServices/Details/5

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

            return(View(saconfig_tclientservices));
        }
        //
        // GET: /ClientServices/Edit/5

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

            ViewBag.Services = new SelectList(db.saconfig_tServices.Where(t => t.DataOwnerID == userID).ToList(), "ID", "ID", saconfig_tclientservices.Services);
            return(View(saconfig_tclientservices));
        }
        public ActionResult DeleteConfirmed(long id)
        {
            Guid userID = GetUserID();
            saconfig_tClientServices saconfig_tclientservices = db.saconfig_tClientServices.Single(s => s.ID == id && s.DataOwnerID == userID);

            db.saconfig_tClientServices.DeleteObject(saconfig_tclientservices);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public ActionResult Edit(saconfig_tClientServices saconfig_tclientservices)
        {
            Guid userID = GetUserID();

            if (ModelState.IsValid)
            {
                saconfig_tclientservices.DataOwnerID = userID;
                db.saconfig_tClientServices.Attach(saconfig_tclientservices);
                db.ObjectStateManager.ChangeObjectState(saconfig_tclientservices, EntityState.Modified);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.Services = new SelectList(db.saconfig_tServices.Where(t => t.DataOwnerID == userID).ToList(), "ID", "ID", saconfig_tclientservices.Services);
            return(View(saconfig_tclientservices));
        }