コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Yesvantpur yesvantpur = db.Yesvantpurs.Find(id);

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

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