Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DeveloperLoginInfo developerLoginInfo = db.DeveloperLoginInfoes.Find(id);

            db.DeveloperLoginInfoes.Remove(developerLoginInfo);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Username,Password")] DeveloperLoginInfo developerLoginInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(developerLoginInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(developerLoginInfo));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "Id,Username,Password")] DeveloperLoginInfo developerLoginInfo)
        {
            if (ModelState.IsValid)
            {
                db.DeveloperLoginInfoes.Add(developerLoginInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(developerLoginInfo));
        }
Пример #4
0
        // GET: Manager_Add/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DeveloperLoginInfo developerLoginInfo = db.DeveloperLoginInfoes.Find(id);

            if (developerLoginInfo == null)
            {
                return(HttpNotFound());
            }
            return(View(developerLoginInfo));
        }