예제 #1
0
        public void ThemTour(ThemTourDTO tourDTO)
        {
            TOUR tour = new TOUR()
            {
                MaTour       = tourDTO.TourDTO.MaTour,
                AnhDaiDien   = tourDTO.AnhDiaDiem,
                GiaNguoiLon  = tourDTO.TourDTO.GiaNguoiLon,
                GiaTreEm     = tourDTO.TourDTO.GiaTreEm,
                MaHanhTrinh  = tourDTO.MaHanhTrinh,
                TenTour      = tourDTO.TourDTO.TenTour,
                MaHDV        = tourDTO.MaHDV,
                MaKS         = tourDTO.MaKS,
                MaLoaiTour   = tourDTO.MaLoaiTour,
                NgayKetThuc  = tourDTO.TourDTO.NgayKT,
                NgayKhoiHanh = tourDTO.TourDTO.NgayKH,
            };

            entity.TOURs.Add(tour);
            entity.SaveChanges();
        }
        public void ThemhanhTrinhMoi(HanhTrinhDTO pHanhTrinh)
        {
            HANHTRINH hanhtrinh = new HANHTRINH()
            {
                MaHanhTrinh = pHanhTrinh.MaHanhTrinh,
                NoiDen      = pHanhTrinh.MaNoiDen,
                NoiDi       = pHanhTrinh.MaNoiDi
            };

            entity.HANHTRINHs.Add(hanhtrinh);
            entity.SaveChanges();
        }
예제 #3
0
        public void ThemCTHopDong(ChiTietHopDongDTO chiTietHopDongDTO)
        {
            ChiTietHopDong hopDong = new ChiTietHopDong()
            {
                MaCT_HopDong = chiTietHopDongDTO.MaCT_HopDong,
                MaHopDong    = chiTietHopDongDTO.MaHopDong, MaTour = chiTietHopDongDTO.MaTour,
                SLTreEm      = chiTietHopDongDTO.SoLuongTreEm,
                SLNguoiLon   = chiTietHopDongDTO.SoLuongNguoiLon,
                ThanhTien    = chiTietHopDongDTO.ThanhTien
            };

            entitiy.ChiTietHopDongs.Add(hopDong);
            entitiy.SaveChanges();
        }
        public void ThemHopDong(HopDongDTO hopDongDTO)
        {
            HOPDONG hopdong = new HOPDONG()
            {
                GhiChu      = hopDongDTO.GhiChu,
                MaHD        = hopDongDTO.MaHD,
                MaKH        = hopDongDTO.MaKH,
                ThoiGianDat = hopDongDTO.ThoiGianDat,
                TinhTrang   = hopDongDTO.TinhTrang,
                TongTien    = hopDongDTO.TongTien,
            };

            entity.HOPDONGs.Add(hopdong);
            entity.SaveChanges();
        }
예제 #5
0
        public void ThemKhachHangMoi(KhachHangDTO khachHangDTO)
        {
            KHACHHANG kh = new KHACHHANG()
            {
                MaKH           = khachHangDTO.MaKH,
                DCKH           = khachHangDTO.DiaChi,
                Email          = khachHangDTO.Email,
                GioiTinh       = khachHangDTO.GioiTinh,
                MaLoaiKH       = khachHangDTO.MaloaiKH,
                NgSinh         = khachHangDTO.NgaySinh,
                SDTKH          = khachHangDTO.Sdt,
                TenKH          = khachHangDTO.TenKH,
                TenDoanhNghiep = khachHangDTO.TenDoanhNghiep
            };

            entity.KHACHHANGs.Add(kh);
            entity.SaveChanges();
        }