示例#1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="tripid"></param>
        /// <param name="name"></param>
        /// <param name="datefrom"></param>
        /// <param name="_trip0"></param>
        public Trip(Guid tripid, string name, DateTime datefrom, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            this.TripId = tripid;
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }
            this.Name     = name;
            this.DateFrom = datefrom;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.Trips.Add(this);

            this.Transportations  = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.Transportation>();
            this.Accommodations   = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.Accommodation>();
            this.Sightseeings     = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.Activity>();
            this.ExchangeRates    = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.ExchangeRate>();
            this.WeatherForecasts = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.WeatherForecast>();
            this.Trips            = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.Trip>();
            this.ExternalLinks    = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.ExternalLink>();
            this.CustomItems      = new System.Collections.Generic.HashSet <global::Tripplanner.DatabaseDesign.CustomItem>();
            Init();
        }
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="address"></param>
        /// <param name="_trip0"></param>
        public Accommodation(string address, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(address))
            {
                throw new ArgumentNullException(nameof(address));
            }
            this.Address = address;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.Accommodations.Add(this);

            Init();
        }
示例#3
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="type"></param>
        /// <param name="_trip0"></param>
        public Transportation(string type, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(type))
            {
                throw new ArgumentNullException(nameof(type));
            }
            this.Type = type;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.Transportations.Add(this);

            Init();
        }
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="url"></param>
        /// <param name="_trip0"></param>
        public ExternalLink(string url, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(url))
            {
                throw new ArgumentNullException(nameof(url));
            }
            this.URL = url;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.ExternalLinks.Add(this);

            Init();
        }
示例#5
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="place"></param>
        /// <param name="_trip0"></param>
        public Activity(string place, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(place))
            {
                throw new ArgumentNullException(nameof(place));
            }
            this.Place = place;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.Sightseeings.Add(this);

            Init();
        }
示例#6
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="location"></param>
        /// <param name="lasttemperature"></param>
        /// <param name="_trip0"></param>
        public WeatherForecast(string location, int lasttemperature, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(location))
            {
                throw new ArgumentNullException(nameof(location));
            }
            this.Location        = location;
            this.LastTemperature = lasttemperature;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.WeatherForecasts.Add(this);

            Init();
        }
示例#7
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="fromcurrency"></param>
        /// <param name="tocurrency"></param>
        /// <param name="_trip0"></param>
        public ExchangeRate(string fromcurrency, string tocurrency, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(fromcurrency))
            {
                throw new ArgumentNullException(nameof(fromcurrency));
            }
            this.FromCurrency = fromcurrency;
            if (string.IsNullOrEmpty(tocurrency))
            {
                throw new ArgumentNullException(nameof(tocurrency));
            }
            this.ToCurrency = tocurrency;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.ExchangeRates.Add(this);

            Init();
        }
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <param name="_trip0"></param>
        public CustomItem(string key, string value, global::Tripplanner.DatabaseDesign.Trip _trip0)
        {
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentNullException(nameof(key));
            }
            this.Key = key;
            if (string.IsNullOrEmpty(value))
            {
                throw new ArgumentNullException(nameof(value));
            }
            this.Value = value;
            if (_trip0 == null)
            {
                throw new ArgumentNullException(nameof(_trip0));
            }
            _trip0.CustomItems.Add(this);

            Init();
        }
示例#9
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="tripid"></param>
 /// <param name="name"></param>
 /// <param name="datefrom"></param>
 /// <param name="_trip0"></param>
 public static Trip Create(Guid tripid, string name, DateTime datefrom, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new Trip(tripid, name, datefrom, _trip0));
 }
示例#10
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="type"></param>
 /// <param name="_trip0"></param>
 public static Transportation Create(string type, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new Transportation(type, _trip0));
 }
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="url"></param>
 /// <param name="_trip0"></param>
 public static ExternalLink Create(string url, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new ExternalLink(url, _trip0));
 }
示例#12
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="fromcurrency"></param>
 /// <param name="tocurrency"></param>
 /// <param name="_trip0"></param>
 public static ExchangeRate Create(string fromcurrency, string tocurrency, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new ExchangeRate(fromcurrency, tocurrency, _trip0));
 }
示例#13
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="place"></param>
 /// <param name="_trip0"></param>
 public static Activity Create(string place, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new Activity(place, _trip0));
 }
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="address"></param>
 /// <param name="_trip0"></param>
 public static Accommodation Create(string address, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new Accommodation(address, _trip0));
 }
示例#15
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="location"></param>
 /// <param name="lasttemperature"></param>
 /// <param name="_trip0"></param>
 public static WeatherForecast Create(string location, int lasttemperature, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new WeatherForecast(location, lasttemperature, _trip0));
 }
示例#16
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 /// <param name="_trip0"></param>
 public static CustomItem Create(string key, string value, global::Tripplanner.DatabaseDesign.Trip _trip0)
 {
     return(new CustomItem(key, value, _trip0));
 }