示例#1
0
        public void xoa_chuyenbay(string id)
        {
            CHUYENBAY x = layOnechuyenbay(id);

            db.CHUYENBAYs.Remove(x);
            db.SaveChanges();
        }
示例#2
0
        public void them_chuyenbay(CHUYENBAY cb)
        {
            string idchuyenbay = Content.RandomString(8);

            cb.idChuyenBay = idchuyenbay;
            string[] idmb = cb.idMayBay.Split(' ');
            cb.idMayBay = idmb[0];
            db.CHUYENBAYs.Add(cb);
            db.SaveChanges();
        }
示例#3
0
        public void sua_chuyenbay(CHUYENBAY cb)
        {
            string[] idmb = cb.idMayBay.Split(' ');

            CHUYENBAY x = layOnechuyenbay(cb.idChuyenBay);

            x.NgayBay  = cb.NgayBay;
            x.GioBay   = cb.GioBay;
            x.GioDen   = cb.GioDen;
            x.NoiDi    = cb.NoiDi;
            x.NoiDen   = cb.NoiDen;
            x.idMayBay = idmb[0];
            db.SaveChanges();
        }