Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            londa londa = db.londas.Find(id);

            db.londas.Remove(londa);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #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")] londa londa)
 {
     if (ModelState.IsValid)
     {
         db.Entry(londa).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(londa));
 }
Exemple #3
0
        // GET: londas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            londa londa = db.londas.Find(id);

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