public void Return_ticket(string iddv)
        {
            DATVE    dv = layOnedatve(iddv);
            VEMAYBAY v  = layOneVeMayBay(dv.idVe);

            v.TrangThai = "Còn vé";
            db.DATVEs.Remove(dv);
            db.SaveChanges();
        }
Beispiel #2
0
        public void dat_ve_login(DATVE dv)
        {
            DateTime date    = DateTime.Now;
            string   iddatve = Content.RandomString(12);

            dv.idDatVe   = iddatve;
            dv.NgayDatVe = date;
            VEMAYBAY vedangdat = db.VEMAYBAYs.First(m => m.idVe == dv.idVe);

            vedangdat.TrangThai = "Hết vé";
            db.SaveChanges();
            db.DATVEs.Add(dv);
            db.SaveChanges();
        }