public void addPassengerToTourGroup(DTO.Employee employee, DTO.TourGroup tourGroup)
        {
            var dummyEmpl   = _bus.getEmployeeById(employee.id);
            var dummyTourGr = _bus.getTourGroupById(tourGroup.id);

            if (dummyEmpl.TourGroups.Contains(dummyTourGr) == false)
            {
                dummyEmpl.TourGroups.Add(dummyTourGr);
            }
            _bus.update(dummyEmpl);
        }
        public void removePassengerFromTourGroup(DTO.Employee emp, DTO.TourGroup tourGroup)
        {
            var dummyEmpl   = _bus.getEmployeeById(emp.id);
            var dummyTourGr = _bus.getTourGroupById(tourGroup.id);

            if (dummyEmpl.TourGroups.Contains(dummyTourGr))
            {
                dummyEmpl.TourGroups.Remove(dummyTourGr);
            }
            _bus.update(dummyEmpl);
        }
예제 #3
0
 public void removeTransportFromTourGroup(DTO.Transport transport, DTO.TourGroup tourGroup)
 {
     if (_bus.isExistsTransportFee(tourGroup.id, transport.id))
     {
         _bus.removeTransportFee(tourGroup.id, transport.id);
     }
     //var dummyTransport = _bus.getCustomerById(transport.id);
     //var dummyTourGroup = _bus.loadTourGroupId(tourGroup.id);
     //if (dummyTransport.TourGroups.Contains(dummyTourGroup))
     //{
     //    dummyTransport.TourGroups.Remove(dummyTourGroup);
     //}
     //_bus.update(dummyTransport);
 }
예제 #4
0
 public void addTransportToTourGroup(DTO.Transport transport, DTO.TourGroup tourGroup)
 {
     if (_bus.isExistsTransportFee(tourGroup.id, transport.id) == false)
     {
         _bus.insertTransportFee(tourGroup.id, transport.id);
     }
     //var dummyCustomer = _bus.getCustomerById(transport.id);
     //var dummyTourGroup = _bus.loadTourGroupId(tourGroup.id);
     //if (dummyCustomer.TourGroups.Contains(dummyTourGroup) == false)
     //{
     //    dummyCustomer.TourGroups.Add(dummyTourGroup);
     //}
     //_bus.update(dummyCustomer);
 }
예제 #5
0
 public void toggleTransportTourGroupStatus(DTO.Transport transport, DTO.TourGroup tourGroup)
 {
     //var dummyTransport = _bus.getCustomerById(transport.id);
     //var dummyTourGroup = _bus.loadTourGroupId(tourGroup.id);
     if (_bus.isExistsTransportFee(tourGroup.id, transport.id))
     {
         _bus.removeTransportFee(tourGroup.id, transport.id);
     }
     else
     {
         _bus.insertTransportFee(tourGroup.id, transport.id);
     }
     //_bus.update(dummyTransport);
 }
        public void toggleCustomerTourGroupStatus(DTO.Employee employee, DTO.TourGroup tourGroup)
        {
            var dummyEmpl   = _bus.getEmployeeById(employee.id);
            var dummyTourGr = _bus.getTourGroupById(tourGroup.id);

            if (dummyEmpl.TourGroups.Contains(dummyTourGr))
            {
                dummyEmpl.TourGroups.Remove(dummyTourGr);
            }
            else
            {
                dummyEmpl.TourGroups.Add(dummyTourGr);
            }
            _bus.update(dummyEmpl);
        }
예제 #7
0
 public void updateTourGroup(DTO.TourGroup _tourGroup)
 {
     _bus.update(_tourGroup);
 }