public async Task <ActionResult> DeleteConfirmed(int id) { Pickup_Tbl pickup_tbl = await db.Pickup_Tbl.FindAsync(id); db.Pickup_Tbl.Remove(pickup_tbl); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "storeid,storelocation,sotrecity,storecontact1,storecontact2,storecontact3,createdby,createddate,updatedby,updateddate")] Pickup_Tbl pickup_tbl) { if (ModelState.IsValid) { db.Entry(pickup_tbl).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(pickup_tbl)); }
// GET: /Pickup/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Pickup_Tbl pickup_tbl = await db.Pickup_Tbl.FindAsync(id); if (pickup_tbl == null) { return(HttpNotFound()); } return(View(pickup_tbl)); }