Exemplo n.º 1
0
        /// <summary>
        /// 相册XML转数据实体
        /// </summary>
        /// <returns></returns>
        public DNNGo_DNNGalleryPro_Slider XmlToEntity(XmlSliserEntity ContentXml)
        {
            DNNGo_DNNGalleryPro_Slider ContentItem = new DNNGo_DNNGalleryPro_Slider();


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



            ContentItem.Options = ConvertOptions_XML(Common.XmlDecode(ContentXml.Options), Setting_SliderSettingDB);

            ContentItem.Extension  = ContentXml.Extension;
            ContentItem.CreateTime = ContentXml.CreateTime;
            ContentItem.StartTime  = ContentXml.StartTime;
            ContentItem.EndTime    = ContentXml.EndTime;

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

            ContentItem.LastIP   = WebHelper.UserHost;
            ContentItem.LastTime = xUserTime.UtcTime();
            ContentItem.LastUser = UserId;
            return(ContentItem);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gallery数据转XML实体
        /// </summary>
        /// <param name="ContentItem"></param>
        /// <returns></returns>
        public XmlSliserEntity EntityToXml(DNNGo_DNNGalleryPro_Slider ContentItem)
        {
            XmlSliserEntity ContentXml = new XmlSliserEntity();

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

            //将Options提取出来处理后再还原
            ContentXml.Options = Common.XmlEncode(ConvertOptions(ContentItem.Options, Setting_SliderSettingDB));
            ContentXml.Groups  = DNNGo_DNNGalleryPro_Group.FindGroupsBySliderID(ContentItem.ID);

            ContentXml.Extension = ContentItem.Extension;

            //提取所有的Layers信息
            ContentXml.Layers = Common.XmlEncode(ConvertLayers(ContentItem));

            ContentXml.StartTime  = ContentItem.StartTime;
            ContentXml.EndTime    = ContentItem.EndTime;
            ContentXml.CreateTime = ContentItem.CreateTime;

            return(ContentXml);
        }