public async Task <ActionResult> DeleteConfirmed(int id) { ContactDetalis contactDetalis = await db.ContactDetalis.FindAsync(id); db.ContactDetalis.Remove(contactDetalis); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,ContactDetaliss,Reception,Booking,President")] ContactDetalis contactDetalis) { if (ModelState.IsValid) { db.Entry(contactDetalis).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(contactDetalis)); }
public async Task <ActionResult> Create([Bind(Include = "Id,ContactDetaliss,Reception,Booking,President")] ContactDetalis contactDetalis) { if (ModelState.IsValid) { db.ContactDetalis.Add(contactDetalis); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(contactDetalis)); }
// GET: Admin/ContactDetalis/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ContactDetalis contactDetalis = await db.ContactDetalis.FindAsync(id); if (contactDetalis == null) { return(HttpNotFound()); } return(View(contactDetalis)); }