Ejemplo n.º 1
0
 /// <summary>
 /// Sets the values passed as parameters to the composer object.
 /// </summary>
 /// <param name="composer"></param>
 /// <param name="composerLastName"></param>
 /// <param name="composerFirstName"></param>
 /// <param name="composerName2"></param>
 /// <param name="composerBirthYear"></param>
 /// <param name="composerDeathYear"></param>
 private static void SetComposerData(Composer composer, string composerLastName, string composerFirstName, string composerName2, string composerName4, string composerName5,
                                     string composerBirthYear, string composerDeathYear)
 {
     composer.ComposerFirstName = composerFirstName;
     composer.ComposerLastName  = composerLastName;
     composer.ComposerName4     = composerName4;
     composer.ComposerName5     = composerName5;
     composer.ComposerName2     = composerName2;
     composer.ComposerBirthYear = composerBirthYear;
     composer.ComposerDeathYear = composerDeathYear;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the conductors information from the given node.
        /// </summary>
        /// <param name="node"></param>
        /// <param name="composer"></param>
        private static void GetComposerData(System.Xml.Linq.XElement node, Composer composer)
        {
            string composerLastName  = node.GetXElement(Constants.Composer.composerLastNameElement);
            string composerFirstName = node.GetXElement(Constants.Composer.composerFirstNameElement);
            string composerName2     = node.GetXElement(Constants.Composer.composerName2Element);
            string composerName4     = node.GetXElement(Constants.Composer.composerName4Element);
            string composerName5     = node.GetXElement(Constants.Composer.composerName5Element);
            string composerBirthYear = node.GetXElement(Constants.Composer.composerBirthYearElement);
            string composerDeathYear = node.GetXElement(Constants.Composer.composerDeathYearElement);

            var composerAddElement = node.Element(Constants.Composer.composerAddNameElement);

            if (composerAddElement != null)
            {
                GetComposerAddNames(composerAddElement, composer);
            }

            SetComposerData(composer, composerLastName, composerFirstName, composerName2, composerName4, composerName5, composerBirthYear, composerDeathYear);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Update given column from xml given the tag name
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="columnName"></param>
        /// <param name="tagName"></param>
        /// <remarks>
        /// Read Composer information from OPAS XML and update the Composer Column based upon appropriate tagName
        /// </remarks>
        public void UpdateData(System.Xml.Linq.XDocument doc, string columnName, string tagName)
        {
            IEnumerable <System.Xml.Linq.XElement> eventElements = doc.Descendants(Constants.Event.eventElement);

            foreach (System.Xml.Linq.XElement element in eventElements)
            {
                IEnumerable <System.Xml.Linq.XElement> composerElements = element.Descendants(Constants.Work.workComposerElement);
                foreach (System.Xml.Linq.XElement composer in composerElements)
                {
                    Composer updateComposer = Composer.GetComposerFromNode(composer);

                    if (updateComposer == null)
                    {
                        continue;
                    }

                    object newValue = composer.GetXElement(tagName);

                    BsoArchiveEntities.UpdateObject(updateComposer, newValue, columnName);
                }
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Composers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToComposers(Composer composer)
 {
     base.AddObject("Composers", composer);
 }
 /// <summary>
 /// Create a new Composer object.
 /// </summary>
 /// <param name="composerID">Initial value of the ComposerID property.</param>
 /// <param name="composerLastName">Initial value of the ComposerLastName property.</param>
 /// <param name="composerFirstName">Initial value of the ComposerFirstName property.</param>
 /// <param name="composerName2">Initial value of the ComposerName2 property.</param>
 /// <param name="composerBirthYear">Initial value of the ComposerBirthYear property.</param>
 /// <param name="composerDeathYear">Initial value of the ComposerDeathYear property.</param>
 /// <param name="createdBy">Initial value of the CreatedBy property.</param>
 /// <param name="createdOn">Initial value of the CreatedOn property.</param>
 /// <param name="modifiedBy">Initial value of the ModifiedBy 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="composerName4">Initial value of the ComposerName4 property.</param>
 /// <param name="composerName5">Initial value of the ComposerName5 property.</param>
 /// <param name="composerAddNameFirst">Initial value of the ComposerAddNameFirst property.</param>
 /// <param name="composerAddNameLast">Initial value of the ComposerAddNameLast property.</param>
 /// <param name="composerAddText">Initial value of the ComposerAddText property.</param>
 /// <param name="composerAddName2">Initial value of the ComposerAddName2 property.</param>
 public static Composer CreateComposer(global::System.Int32 composerID, global::System.String composerLastName, global::System.String composerFirstName, global::System.String composerName2, global::System.String composerBirthYear, global::System.String composerDeathYear, global::System.Int32 createdBy, global::System.DateTime createdOn, global::System.Int32 modifiedBy, global::System.DateTime modifiedOn, global::System.Byte[] stamp, global::System.Boolean active, global::System.String composerName4, global::System.String composerName5, global::System.String composerAddNameFirst, global::System.String composerAddNameLast, global::System.String composerAddText, global::System.String composerAddName2)
 {
     Composer composer = new Composer();
     composer.ComposerID = composerID;
     composer.ComposerLastName = composerLastName;
     composer.ComposerFirstName = composerFirstName;
     composer.ComposerName2 = composerName2;
     composer.ComposerBirthYear = composerBirthYear;
     composer.ComposerDeathYear = composerDeathYear;
     composer.CreatedBy = createdBy;
     composer.CreatedOn = createdOn;
     composer.ModifiedBy = modifiedBy;
     composer.ModifiedOn = modifiedOn;
     composer.Stamp = stamp;
     composer.Active = active;
     composer.ComposerName4 = composerName4;
     composer.ComposerName5 = composerName5;
     composer.ComposerAddNameFirst = composerAddNameFirst;
     composer.ComposerAddNameLast = composerAddNameLast;
     composer.ComposerAddText = composerAddText;
     composer.ComposerAddName2 = composerAddName2;
     return composer;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Sets the values passed as parameters to the composer object.
 /// </summary>
 /// <param name="composer"></param>
 /// <param name="composerLastName"></param>
 /// <param name="composerFirstName"></param>
 /// <param name="composerName2"></param>
 /// <param name="composerBirthYear"></param>
 /// <param name="composerDeathYear"></param>
 private static void SetComposerData(Composer composer, string composerLastName, string composerFirstName, string composerName2, string composerName4, string composerName5,
     string composerBirthYear, string composerDeathYear)
 {
     composer.ComposerFirstName = composerFirstName;
     composer.ComposerLastName = composerLastName;
     composer.ComposerName4 = composerName4;
     composer.ComposerName5 = composerName5;
     composer.ComposerName2 = composerName2;
     composer.ComposerBirthYear = composerBirthYear;
     composer.ComposerDeathYear = composerDeathYear;
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Gets the conductors information from the given node.
        /// </summary>
        /// <param name="node"></param>
        /// <param name="composer"></param>
        private static void GetComposerData(System.Xml.Linq.XElement node, Composer composer)
        {
            string composerLastName = node.GetXElement(Constants.Composer.composerLastNameElement);
            string composerFirstName = node.GetXElement(Constants.Composer.composerFirstNameElement);
            string composerName2 = node.GetXElement(Constants.Composer.composerName2Element);
            string composerName4 = node.GetXElement(Constants.Composer.composerName4Element);
            string composerName5 = node.GetXElement(Constants.Composer.composerName5Element);
            string composerBirthYear = node.GetXElement(Constants.Composer.composerBirthYearElement);
            string composerDeathYear = node.GetXElement(Constants.Composer.composerDeathYearElement);

            var composerAddElement = node.Element(Constants.Composer.composerAddNameElement);
            if (composerAddElement != null)
                GetComposerAddNames(composerAddElement, composer);

            SetComposerData(composer, composerLastName, composerFirstName, composerName2, composerName4, composerName5, composerBirthYear, composerDeathYear);
        }
Ejemplo n.º 8
0
 private static void GetComposerAddNames(System.Xml.Linq.XElement node, Composer composer)
 {
     composer.ComposerAddNameFirst = node.GetXElement(Constants.Composer.composerAddNameFirstElement);
     composer.ComposerAddNameLast = node.GetXElement(Constants.Composer.composerAddNameLastElement);
     composer.ComposerAddName2 = node.GetXElement(Constants.Composer.composerAddName2Element);
     composer.ComposerAddText = node.GetXElement(Constants.Composer.composerAddNameTextElement);
 }
        public static Composer NewComposer()
        {
            Composer newObject = new Composer();

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