示例#1
0
 public byte[] ReadLayoutData(string folderName, bool clearing)
 {
     if (!clearing && !AllowSaveOrRestore(folderName))
     {
         return(null);
     }
     return(ElementLayoutData.GetLayoutData(folderName).Data);
 }
示例#2
0
 public void WriteLayoutData(string folderName, byte[] data, bool clearing)
 {
     if (clearing || !AllowSaveOrRestore(folderName))
     {
         return;
     }
     ElementLayoutData.GetLayoutData(folderName).Data = data;
 }
示例#3
0
        public static ElementLayoutData GetLayoutData(string folderName)
        {
            var layoutDataCollection = LayoutManager.Current.GetLayoutData <ElementLayoutData>();

            layoutDataCollection.Filter = CriteriaOperator.Parse("FolderName = ?", folderName);
            if (layoutDataCollection.Count != 0)
            {
                return(layoutDataCollection[0]);
            }
            var layoutData = new ElementLayoutData(VideoRentCurrentUser.GetCurrentUser(LayoutManager.Current.Session), folderName);

            LayoutManager.Current.LayoutData.Add(layoutData);
            return(layoutData);
        }