示例#1
0
        public ActionResult Edit(int id, BanVeNgay sst)
        {
            var e = db.BanVeNgays.SingleOrDefault(x => x.MaGiaoDich == id);

            e.Ngay       = sst.Ngay;
            e.MaPhuXe    = sst.MaPhuXe;
            e.MaVeNgay   = sst.MaVeNgay;
            e.SoVePhatRa = sst.SoVePhatRa;
            e.SoVeThuVe  = sst.SoVeThuVe;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Create(BanVeNgay e)
 {
     db.BanVeNgays.Add(e);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }