예제 #1
0
		/// <summary>
		/// Gets the model for the given site.
		/// </summary>
		/// <param name="siteid">The site id</param>
		/// <returns>The model</returns>
		public static LinkDialogModel GetBySiteId(Guid siteid) {
			var m = new LinkDialogModel() ;

			m.ActiveSite = siteid ;

			using (var db = new DataContext()) {
				var site = db.SiteTrees.Where(s => s.Id == m.ActiveSite).Single() ;
				m.Pages = Sitemap.GetStructure(site.InternalId) ;
			}
			return m ;
		}
예제 #2
0
        /// <summary>
        /// Gets the model for the given site.
        /// </summary>
        /// <param name="siteid">The site id</param>
        /// <returns>The model</returns>
        public static LinkDialogModel GetBySiteId(Guid siteid)
        {
            var m = new LinkDialogModel();

            m.ActiveSite = siteid;

            using (var db = new DataContext()) {
                var site = db.SiteTrees.Where(s => s.Id == m.ActiveSite).Single();
                m.Pages = Sitemap.GetStructure(site.InternalId);
            }
            return(m);
        }