private void _acceptBtn_Click(object sender, EventArgs e) { Destination destination = new Destination(); destination.name = _destinationTb.Text.Trim(); destination.city = (_citiesCbb.SelectedItem as BusinessEntity.VietNamCities.City).name; for (int i = 0; i < _tourSitesTempLv.Items.Count; i++) { TourSite toursite = new TourSite(); toursite.name = _tourSitesTempLv.Items[i].Text; toursite.Destination = destination; destination.TourSites.Add(toursite); } for (int i = 0; i < _hotelBindingSource.Count; i++) { var hotel = _hotelBindingSource.List[i] as Hotel; hotel.Destination = destination; destination.Hotels.Add(hotel); } _destinationPresenter.addDestination(destination); clearAllTb(); }
private void addTourSite() { TourSite toursite = new TourSite(); toursite.name = _tourSiteName.Text.Trim(); toursite.destination_id = _destination.id; _presenter.addTourSite(toursite); }
public void deleteTourSite(TourSite toursite) { _bus.deletaById(toursite.id); }
public void addTourSite(TourSite toursite) { _bus.add(toursite); this.loadTourSiteByDesinationId(toursite.destination_id); }
public void update(TourSite toursite) { _unitOfWork.TourSiteRepository.Update(toursite); _unitOfWork.Save(); }
public void add(TourSite toursite) { _unitOfWork.TourSiteRepository.Insert(toursite); _unitOfWork.Save(); }