public Tour AddNewTour(string name, string startLocation, string endLocation, float distance, string mapImagePath, string description = "\"\"")
        {
            DbCommand command = database.CreateCommand(SQL_INSTERT_NEW_ITEM);

            database.DefineParameter <string>(command, "@name", DbType.String, name);
            database.DefineParameter <string>(command, "@startlocation", DbType.String, startLocation);
            database.DefineParameter <string>(command, "@endlocation", DbType.String, endLocation);
            database.DefineParameter <float>(command, "@distance", DbType.Decimal, distance);
            database.DefineParameter <string>(command, "@mapimagepath", DbType.String, mapImagePath);
            database.DefineParameter <string>(command, "@description", DbType.String, description);

            return(FindByID(database.ExecuteScalar(command)));
        }
        public Log AddNewTourLog(Tour tour, string date, string report = "\"\"", int distance = 0, string duration = "\"\"",
                                 int rating     = 0, int steps = 0, float weightkg = 0, string bloodpreassure = "\"\"",
                                 string feeling = "\"\"", string weather = "\"\"")
        {
            DbCommand command = database.CreateCommand(SQL_INSERT_NEW_LOG);

            database.DefineParameter <int>(command, "@tourid", DbType.Int32, tour.ID);
            database.DefineParameter <string>(command, "@date", DbType.String, date);
            database.DefineParameter <string>(command, "@report", DbType.String, report);
            database.DefineParameter <int?>(command, "@distance", DbType.Int32, distance);
            database.DefineParameter <string>(command, "@duration", DbType.String, duration);
            database.DefineParameter <int?>(command, "@rating", DbType.Int32, rating);
            database.DefineParameter <int?>(command, "@steps", DbType.Int32, steps);
            database.DefineParameter <float?>(command, "@weightkg", DbType.Decimal, weightkg);
            database.DefineParameter <string>(command, "@bloodpreassure", DbType.String, bloodpreassure);
            database.DefineParameter <string>(command, "@feeling", DbType.String, feeling);
            database.DefineParameter <string>(command, "@weather", DbType.String, weather);

            return(FindById(database.ExecuteScalar(command)));
        }