示例#1
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);
 }
示例#2
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);
 }
示例#3
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);
 }