예제 #1
0
        public ActionResult Create([Bind(Include = "ID,ID_user,ID_pc,Time_login,Time_logout")] Logs logs)
        {
            if (ModelState.IsValid)
            {
                db.Logs.Add(logs);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(logs));
        }
예제 #2
0
        public ActionResult Create([Bind(Include = "ID,ID_user,ID_pc,Auth_key,Device")] Auths auths)
        {
            if (ModelState.IsValid)
            {
                db.Auths.Add(auths);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(auths));
        }
예제 #3
0
        public ActionResult Create([Bind(Include = "ID,PC_name,Lock_status")] Computers computers)
        {
            if (ModelState.IsValid)
            {
                db.Computers.Add(computers);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(computers));
        }
예제 #4
0
        public ActionResult Create([Bind(Include = "ID,Username,Type")] Users users)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(users);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(users));
        }