private void updateDataGridView() { // new lai cho no cap nhat lai. ma vay so no cham. _tourBus = new TourBUS(); _destination = _tourBus.getAllDestination(); _tour = _tourBus.getEntries(); //bsListTour.DataSource = null; bsListTour.DataSource = _tour; bsDestination.DataSource = _destination; //((DataGridView)dgvListTour).DataSource = bsListTour; //dgvListTour.Refresh(); tbTourName.Clear(); tbTourPrice.Clear(); ckbSelectAll.Checked = false; dtpStart_date.Value = DateTime.Now; dtpEnd_date.Value = DateTime.Now.AddYears(1); btnAddTour.Text = "Add"; }
private void init() { _tourGroups = _tourGroupBus.getEntries(); _tourGroupBs.DataSource = _tourGroups; _filterBs.DataSource = _tourGroups.ToDataTable(); _tours = _tourBus.getEntries(); _tourBs.DataSource = _tours; return; _passengers = _passengerBus.getEntries(); _passengerBs.DataSource = _passengers.ToDataTable(); _employees = _employeeTourGroupBus.getAllEmployeeTourGroup(); _employeeBs.DataSource = _employees.ToDataTable(); _transports = _transportTourGroupBus.getAllTransportTourGroup(); _transportBs.DataSource = _transports.ToDataTable(); }
public fmTourManager() { InitializeComponent(); postInit(); _tourBus = new TourBUS(); _categoryBus = new TourCategoryBUS(); _destinationBus = new DestinationBUS(); _toursiteBus = new TourSiteBUS(); _priceBus = new TourPriceBUS(); _tour = _tourBus.getEntries(); _category = _categoryBus.getEntries(); //_destination = _destinationBus.getEntries(); _destination = _tourBus.getAllDestination(); _isAdd = true; _currentTour = new Tour(); _currentTour = null; _minDate = new DateTime(2000, 1, 1); _maxDate = new DateTime(2100, 1, 1); dtpStart_date.MinDate = _minDate; dtpStart_date.MaxDate = _maxDate; dtpEnd_date.MinDate = _minDate; dtpEnd_date.MaxDate = _maxDate; dtpEnd_date.Value = DateTime.Now.AddYears(1); }
public TourSearchEngine() { _bus = new TourBUS(); _entry = _bus.getEntries(); }