public TourLog AddNewTourLog(string name, string description, string report, string vehicle, string dateTime, int tourId, decimal distance, decimal totalTime, int rating) { ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO(); return(tourLogDao.AddNewTourLog(name, description, report, vehicle, dateTime, tourId, distance, totalTime, rating)); }
public bool GenerateSummary(Tour currentTour) { TourPlannerReport report = new TourPlannerReport(new SaveFile()); ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO(); return(report.GenerateReportPDF(currentTour, tourLogDao.GetAllTourLogs(), true)); }
public bool JsonExport() { IJsonManager jsonManager = new JsonManager(new SaveFile(), new OpenFile()); ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO(); ITourDAO tourDao = DALFactory.CreateTourDAO(); IEnumerable <Tour> tours = tourDao.GetTours(); IEnumerable <TourLog> tourLogs = tourLogDao.GetAllTourLogs(); return(jsonManager.JsonExport(tours, tourLogs)); }
public void DeleteTourLog(TourLog tourLog) { ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO(); tourLogDao.DeleteTourLog(tourLog); }
public IEnumerable <TourLog> GetTourLogs(Tour tour) { ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO(); return(tourLogDao.GetTourLogs(tour)); }