/// <summary> /// Creates an album template on the site from a locally created album template /// </summary> /// <param name="at"></param> public AlbumTemplate CreateAlbumTemplate(AlbumTemplate at) { if (at != null) { // If the album template doesn't exist AlbumTemplate myAlbumTemplate = this.FindAlbumTemplate(at.AlbumTemplateName); if (myAlbumTemplate == null) { // Create it at.basic = basic; return at.Create(); } // Else, return it else return myAlbumTemplate; } else { throw new ArgumentNullException("Album Template parameter is null!"); } }
/// <summary> /// Creates a new album template with the specified name /// </summary> /// <param name="Title"></param> /// <returns></returns> public AlbumTemplate CreateAlbumTemplate(string Name) { // If the album template doesn't exist AlbumTemplate myAlbumTemplate = this.FindAlbumTemplate(Name); if (myAlbumTemplate == null) { // Create it myAlbumTemplate = new AlbumTemplate(); myAlbumTemplate.AlbumTemplateName = Name; myAlbumTemplate.basic = basic; return myAlbumTemplate.Create(); } // Else, return it else return myAlbumTemplate; }