Exemple #1
0
        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));
        }
Exemple #2
0
        public bool GenerateSummary(Tour currentTour)
        {
            TourPlannerReport report     = new TourPlannerReport(new SaveFile());
            ITourLogDAO       tourLogDao = DALFactory.CreateTourLogDAO();

            return(report.GenerateReportPDF(currentTour, tourLogDao.GetAllTourLogs(), true));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        public void DeleteTourLog(TourLog tourLog)
        {
            ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO();

            tourLogDao.DeleteTourLog(tourLog);
        }
Exemple #5
0
        public IEnumerable <TourLog> GetTourLogs(Tour tour)
        {
            ITourLogDAO tourLogDao = DALFactory.CreateTourLogDAO();

            return(tourLogDao.GetTourLogs(tour));
        }