public static EventArtist AddEventArtist(Event evt, Artist artist, Instrument instrument)
 {
     var eventArtist = EventArtist.NewEventArtist();
     eventArtist.Event = evt;
     eventArtist.Artist = artist;
     eventArtist.Instrument = instrument;
     return eventArtist;
 }
 /// <summary>
 /// Create a new Artist object.
 /// </summary>
 /// <param name="artistID">Initial value of the ArtistID property.</param>
 /// <param name="artistLastName">Initial value of the ArtistLastName property.</param>
 /// <param name="artistFirstName">Initial value of the ArtistFirstName property.</param>
 /// <param name="artistNote">Initial value of the ArtistNote property.</param>
 /// <param name="artistStatus">Initial value of the ArtistStatus property.</param>
 /// <param name="artistStatusID">Initial value of the ArtistStatusID property.</param>
 /// <param name="createdOn">Initial value of the CreatedOn property.</param>
 /// <param name="modifiedOn">Initial value of the ModifiedOn property.</param>
 /// <param name="stamp">Initial value of the Stamp property.</param>
 /// <param name="active">Initial value of the Active property.</param>
 /// <param name="createdBy">Initial value of the CreatedBy property.</param>
 /// <param name="modifiedBy">Initial value of the ModifiedBy property.</param>
 /// <param name="artistName4">Initial value of the ArtistName4 property.</param>
 /// <param name="artistName5">Initial value of the ArtistName5 property.</param>
 public static Artist CreateArtist(global::System.Int32 artistID, global::System.String artistLastName, global::System.String artistFirstName, global::System.String artistNote, global::System.Int32 artistStatus, global::System.Int32 artistStatusID, global::System.DateTime createdOn, global::System.DateTime modifiedOn, global::System.Byte[] stamp, global::System.Boolean active, global::System.Int32 createdBy, global::System.Int32 modifiedBy, global::System.String artistName4, global::System.String artistName5)
 {
     Artist artist = new Artist();
     artist.ArtistID = artistID;
     artist.ArtistLastName = artistLastName;
     artist.ArtistFirstName = artistFirstName;
     artist.ArtistNote = artistNote;
     artist.ArtistStatus = artistStatus;
     artist.ArtistStatusID = artistStatusID;
     artist.CreatedOn = createdOn;
     artist.ModifiedOn = modifiedOn;
     artist.Stamp = stamp;
     artist.Active = active;
     artist.CreatedBy = createdBy;
     artist.ModifiedBy = modifiedBy;
     artist.ArtistName4 = artistName4;
     artist.ArtistName5 = artistName5;
     return artist;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Artists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToArtists(Artist artist)
 {
     base.AddObject("Artists", artist);
 }
        public static Artist NewArtist()
        {
            Artist newObject = new Artist();

            BsoArchiveEntities.Current.AddToArtists(newObject);
            BsoArchiveEntities.SetDefaultValue(newObject);
            return newObject;
        }
Esempio n. 5
0
 private static Artist SetArtistData(Artist artist, int artistId, string artistFirstName, string artistLastName, string artistName4, string artistName5, string artistNote, int artistStatus, int artistStatusId)
 {
     artist.ArtistID = artistId;
     artist.ArtistStatus = artistStatus;
     artist.ArtistStatusID = artistStatusId;
     artist.ArtistFirstName = artistFirstName;
     artist.ArtistLastName = artistLastName;
     artist.ArtistNote = artistNote;
     artist.ArtistName4 = artistName4;
     artist.ArtistName5 = artistName5;
     return artist;
 }
Esempio n. 6
0
        /// <summary>
        /// Add an event artist
        /// </summary>
        /// <param name="artist"></param>
        /// <param name="instrument"></param>
        /// <remarks>
        /// Check if the event artist exists. If it does then return the event artist object, otherwise
        /// create a new event artist object and return it.
        /// </remarks>
        /// <returns></returns>
        public EventArtist AddEventArtist(Artist artist, Instrument instrument)
        {
            var eventArtist = this.EventArtists.FirstOrDefault(ea => ea.ArtistID == artist.ArtistID && ea.InstrumentID == instrument.InstrumentID);

            if (eventArtist != null) return eventArtist;

            eventArtist = EventArtist.AddEventArtist(this, artist, instrument);

            return eventArtist;
        }