Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("kh_id,kh_ten,kh_sdt,kh_ngaysinh,kh_email,kh_cmnd")] Tour_khachhang tour_khachhang)
        {
            if (id != tour_khachhang.kh_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_khachhang);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_khachhangExists(tour_khachhang.kh_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_khachhang));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("dd_id,dd_thanhpho,dd_ten,dd_mota")] Tour_diadiem tour_diadiem)
        {
            if (id != tour_diadiem.dd_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_diadiem);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_diadiemExists(tour_diadiem.dd_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_diadiem));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("chiphi_id,doan_id,chiphi_total,chiphi_chitiet")] Tour_chiphi tour_chiphi)
        {
            if (id != tour_chiphi.chiphi_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_chiphi);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_chiphiExists(tour_chiphi.chiphi_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_chiphi));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("gia_id,gia_sotien,tour_id,gia_tungay,gia_denngay")] Tour_gia tour_gia)
        {
            if (id != tour_gia.gia_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_gia);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_giaExists(tour_gia.gia_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_gia));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("nv_id,nv_ten,nv_sdt,nv_ngaysinh,nv_email,nv_nhiemvu")] Tour_nhanvien tour_nhanvien)
        {
            if (id != tour_nhanvien.nv_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_nhanvien);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_nhanvienExists(tour_nhanvien.nv_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_nhanvien));
        }
Exemplo n.º 6
0
        public async Task <IActionResult> Edit(int id, [Bind("tour_id,tour_ten,tour_mota,loai_id")] Tours tours)
        {
            if (id != tours.tour_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tours);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ToursExists(tours.tour_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tours));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> Edit(int id, [Bind("doan_id,tour_id,gia_id,doan_name,doan_ngaydi,doan_ngayve,doan_chitietchuongtrinh")] Tour_doan tour_doan)
        {
            if (id != tour_doan.doan_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_doan);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_doanExists(tour_doan.doan_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_doan));
        }
Exemplo n.º 8
0
        public async Task <IActionResult> Edit(int id, [Bind("nguoidi_id,doan_id,nguoidi_dsnhanvien,nguoidi_dskhach")] Tour_nguoidi tour_nguoidi)
        {
            if (id != tour_nguoidi.nguoidi_id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tour_nguoidi);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Tour_nguoidiExists(tour_nguoidi.nguoidi_id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tour_nguoidi));
        }