Esempio n. 1
0
        /// <summary>
        /// Gallery数据转XML实体
        /// </summary>
        /// <param name="ContentItem"></param>
        /// <returns></returns>
        public XmlLayerEntity EntityToXml(DNNGo_DNNGalleryPro_Layer ContentItem)
        {
            XmlLayerEntity ContentXml = new XmlLayerEntity();

            ContentXml.Sort       = ContentItem.Sort;
            ContentXml.Status     = ContentItem.Status;
            ContentXml.CreateTime = ContentItem.CreateTime;



            //将Options提取出来处理后再还原
            ContentXml.Options = ConvertOptions(ContentItem.Options, Setting_LayerSettingDB);

            return(ContentXml);
        }
Esempio n. 2
0
        /// <summary>
        /// 相册XML转数据实体
        /// </summary>
        /// <returns></returns>
        public DNNGo_DNNGalleryPro_Layer XmlToEntity(XmlLayerEntity ContentXml)
        {
            DNNGo_DNNGalleryPro_Layer ContentItem = new DNNGo_DNNGalleryPro_Layer();


            ContentItem.Sort       = ContentXml.Sort;
            ContentItem.Status     = ContentXml.Status;
            ContentItem.CreateTime = ContentXml.CreateTime;


            ContentItem.Options = Common.XmlDecode(ContentXml.Options);


            ContentItem.ModuleId = ModuleID;
            ContentItem.PortalId = DNNGalleryPro_PortalSettings.PortalId;

            ContentItem.LastIP   = WebHelper.UserHost;
            ContentItem.LastTime = xUserTime.UtcTime();
            ContentItem.LastUser = UserId;
            return(ContentItem);
        }