public ActionResult DeleteConfirmed(int id) { Detali detali = db.Detali.Find(id); db.Detali.Remove(detali); db.SaveChanges(); return(RedirectToAction("Index")); }
public void SetOb(int x, int y, Detali c) { if (x < 0 || y < 0 || x >= m || y >= h) { return; } mas[x, y] = c; }
public ActionResult Edit([Bind(Include = "Id,NmDetal")] Detali detali) { if (ModelState.IsValid) { db.Entry(detali).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(detali)); }
public ActionResult Create([Bind(Include = "Id,NmDetal")] Detali detali) { if (ModelState.IsValid) { db.Detali.Add(detali); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(detali)); }
// GET: Detalis/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Detali detali = db.Detali.Find(id); if (detali == null) { return(HttpNotFound()); } return(View(detali)); }