コード例 #1
0
        public static EventWork AddEventWork(Event evt, Work work)
        {
            var eventWork = EventWork.NewEventWork();
            eventWork.Event = evt;
            eventWork.Work = work;
            eventWork.WorkPremiere = work.WorkPremiere;

            return eventWork;
        }
コード例 #2
0
        /// <summary>
        /// Add an event work
        /// </summary>
        /// <param name="work"></param>
        /// <remarks>
        /// Check if the event work exists. If it does then return the event work object, otherwise
        /// create a new event work object and return it.
        /// </remarks>
        /// <returns></returns>
        public EventWork AddEventWork(Work work)
        {
            var eventWork = this.EventWorks.FirstOrDefault(ep => ep.WorkID == work.WorkID && ep.WorkPremiere == work.WorkPremiere);

            if (eventWork != null)
            {
                return(eventWork);
            }

            eventWork = EventWork.AddEventWork(this, work);

            return(eventWork);
        }
コード例 #3
0
 /// <summary>
 /// Create a new EventWork object.
 /// </summary>
 /// <param name="eventWorkID">Initial value of the EventWorkID property.</param>
 /// <param name="eventID">Initial value of the EventID property.</param>
 /// <param name="workID">Initial value of the WorkID property.</param>
 /// <param name="workPremiere">Initial value of the WorkPremiere 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>
 public static EventWork CreateEventWork(global::System.Int32 eventWorkID, global::System.Int32 eventID, global::System.Int32 workID, global::System.String workPremiere, global::System.DateTime createdOn, global::System.DateTime modifiedOn, global::System.Byte[] stamp, global::System.Boolean active, global::System.Int32 createdBy, global::System.Int32 modifiedBy)
 {
     EventWork eventWork = new EventWork();
     eventWork.EventWorkID = eventWorkID;
     eventWork.EventID = eventID;
     eventWork.WorkID = workID;
     eventWork.WorkPremiere = workPremiere;
     eventWork.CreatedOn = createdOn;
     eventWork.ModifiedOn = modifiedOn;
     eventWork.Stamp = stamp;
     eventWork.Active = active;
     eventWork.CreatedBy = createdBy;
     eventWork.ModifiedBy = modifiedBy;
     return eventWork;
 }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the EventWorks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEventWorks(EventWork eventWork)
 {
     base.AddObject("EventWorks", eventWork);
 }
コード例 #5
0
        public static EventWork NewEventWork()
        {
            EventWork newObject = new EventWork();

            BsoArchiveEntities.Current.AddToEventWorks(newObject);
            BsoArchiveEntities.SetDefaultValue(newObject);
            return newObject;
        }