Exemplo n.º 1
0
        /// <summary>
        /// 从站点领域对象转换成为数据传输对象
        /// </summary>
        /// <param name="site"></param>
        /// <returns></returns>
        public static SiteDto ConvertFromSite(ISite ist)
        {
            CmsSiteEntity site = ist.Get();

            return(new SiteDto
            {
                ProAddress = site.ProAddress,
                DirName = site.AppName,
                Domain = site.Domain,
                FullDomain = ist.FullDomain,
                Location = site.Location,
                ProEmail = site.ProEmail,
                ProFax = site.ProFax,
                Language = ist.Language(),
                ProPost = site.ProPost,
                Name = site.Name,
                Note = site.Note,
                ProNotice = site.ProNotice,
                ProPhone = site.ProPhone,
                ProIm = site.ProIm,
                RunType = (int)ist.RunType(),
                SeoDescription = site.SeoDescription,
                SeoKeywords = site.SeoKeywords,
                SeoTitle = site.SeoTitle,
                SiteId = site.SiteId,
                ProSlogan = site.ProSlogan,
                State = ist.State(),
                ProTel = site.ProTel,
                Tpl = site.Tpl
            });
        }