public ActionResult DeleteConfirmed(long id) { shops shops = db.shops.Find(id); db.shops.Remove(shops); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,gourmet_palace_id,code,position,area,rent,created_at,updated_at")] shops shops) { if (ModelState.IsValid) { db.Entry(shops).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shops)); }
public ActionResult Create([Bind(Include = "id,gourmet_palace_id,code,position,area,rent,created_at,updated_at")] shops shops) { if (ModelState.IsValid) { db.shops.Add(shops); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shops)); }
// GET: shops/Delete/5 public ActionResult Delete(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } shops shops = db.shops.Find(id); if (shops == null) { return(HttpNotFound()); } return(View(shops)); }
private void shopDetailsToolStripMenuItem_Click(object sender, EventArgs e) { shops s = new shops(); s.ShowDialog(); }