示例#1
0
        public List <TripPoint> AddTripToTourist(List <TripPoint> tripPoints)
        {
            DBservices db = new DBservices();

            db.DeleteLastTripTourist(tripPoints[0].TouristEmail);
            if (tripPoints.Count > 0)
            {
                for (int i = 0; i < tripPoints.Count; i++)
                {
                    db.AddPointToSQL(tripPoints[i]);
                }
            }
            if (db.GetAllPointsOfTourist(tripPoints[0].TouristEmail) == null)
            {
                return(null);
            }
            else
            {
                return(db.GetAllPointsOfTourist(tripPoints[0].TouristEmail));
            }
        }