Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            bellary bellary = db.bellaries.Find(id);

            db.bellaries.Remove(bellary);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Train_number,Train_name,Source_stn,Dest_stn,Arrival,Depart,halt,Su,Mo,Tu,We,Th,Fr,Sa,train_priority,platform")] bellary bellary)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bellary).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bellary));
 }
Esempio n. 3
0
        // GET: bellaries/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            bellary bellary = db.bellaries.Find(id);

            if (bellary == null)
            {
                return(HttpNotFound());
            }
            return(View(bellary));
        }