Пример #1
0
        public void SaveChanges(ContentVideoViewModel data)
        {
            VideoSaveModel videoSaveModel = new VideoSaveModel();

            videoSaveModel.Src    = data.VideoSource;
            videoSaveModel.URL    = data.VideoURL;
            videoSaveModel.Height = data.Height;
            videoSaveModel.Width  = data.Width;

            System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(videoSaveModel.GetType());
            System.Text.StringBuilder sb     = new System.Text.StringBuilder();
            System.IO.StringWriter    writer = new System.IO.StringWriter(sb);
            ser.Serialize(writer, videoSaveModel);

            this.Contents = sb.ToString();
        }
Пример #2
0
 public ContentVideo(ContentVideoViewModel data)
 {
     _ContentID = data.ContentID;
     _ModuleID  = data.ModuleID;
     Initialize();
 }