Exemplo n.º 1
0
        //
        // GET: /SettingControl/Details/5

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

            return(View(saconfig_tsettingcontrol));
        }
Exemplo n.º 2
0
        //
        // GET: /SettingControl/Edit/5

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

            ViewBag.LN0 = new SelectList(db.saconfig_tLN0.Where(t => t.DataOwnerID == userID).ToList(), "ID", "desc", saconfig_tsettingcontrol.LN0);
            return(View(saconfig_tsettingcontrol));
        }
Exemplo n.º 3
0
        public ActionResult DeleteConfirmed(long id)
        {
            Guid userID = GetUserID();
            saconfig_tSettingControl saconfig_tsettingcontrol = db.saconfig_tSettingControl.Single(s => s.ID == id && s.DataOwnerID == userID);

            db.saconfig_tSettingControl.DeleteObject(saconfig_tsettingcontrol);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 4
0
        public ActionResult Edit(saconfig_tSettingControl saconfig_tsettingcontrol)
        {
            Guid userID = GetUserID();

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