Example #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            shops shops = db.shops.Find(id);

            db.shops.Remove(shops);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 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));
 }
Example #3
0
        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));
        }
Example #4
0
        // 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));
        }
Example #5
0
        private void shopDetailsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            shops s = new shops();

            s.ShowDialog();
        }