Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Goest goest = db.Goest.Find(id);

            db.Goest.Remove(goest);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "IdGoest,IdNumber,SornameGoesst,NameGoest,SurnameGoest,Age,DateArrival,DateExit,Sum")] Goest goest)
 {
     if (ModelState.IsValid)
     {
         db.Entry(goest).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdNumber = new SelectList(db.Number, "id_Number", "Komplektaci_nomera", goest.IdNumber);
     return(View(goest));
 }
Example #3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Goest goest = db.Goest.Find(id);

            if (goest == null)
            {
                return(HttpNotFound());
            }
            return(View(goest));
        }
Example #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Goest goest = db.Goest.Find(id);

            if (goest == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IdNumber = new SelectList(db.Number, "id_Number", "Komplektaci_nomera", goest.IdNumber);
            return(View(goest));
        }