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); }
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); }
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); }
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); }
public void updateTourGroup(DTO.TourGroup _tourGroup) { _bus.update(_tourGroup); }