public ActionResult DeleteConfirmed(int id) { tBron_nomera tBron_nomera = db.tBron_nomera.Find(id); db.tBron_nomera.Remove(tBron_nomera); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_Nomer,ID_Rabotnika,ID_Klient,Data_zaseleniya,Data_viseleniya")] tBron_nomera tBron_nomera) { if (ModelState.IsValid) { db.Entry(tBron_nomera).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_Klient = new SelectList(db.tKlient, "ID_Klient", "Imya", tBron_nomera.ID_Klient); ViewBag.ID_Nomer = new SelectList(db.tNomer, "ID_Nomer", "Tip_nomera", tBron_nomera.ID_Nomer); ViewBag.ID_Rabotnika = new SelectList(db.tSotrudnik, "ID_Rabotnika", "Imya", tBron_nomera.ID_Rabotnika); return(View(tBron_nomera)); }
// GET: tBron_nomera/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tBron_nomera tBron_nomera = db.tBron_nomera.Find(id); if (tBron_nomera == null) { return(HttpNotFound()); } return(View(tBron_nomera)); }
// GET: tBron_nomera/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tBron_nomera tBron_nomera = db.tBron_nomera.Find(id); if (tBron_nomera == null) { return(HttpNotFound()); } ViewBag.ID_Klient = new SelectList(db.tKlient, "ID_Klient", "Imya", tBron_nomera.ID_Klient); ViewBag.ID_Nomer = new SelectList(db.tNomer, "ID_Nomer", "Tip_nomera", tBron_nomera.ID_Nomer); ViewBag.ID_Rabotnika = new SelectList(db.tSotrudnik, "ID_Rabotnika", "Imya", tBron_nomera.ID_Rabotnika); return(View(tBron_nomera)); }