Exemplo n.º 1
0
 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";
 }
Exemplo n.º 2
0
 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);
 }