public byte[] ReadLayoutData(string folderName, bool clearing) { if (!clearing && !AllowSaveOrRestore(folderName)) { return(null); } return(ElementLayoutData.GetLayoutData(folderName).Data); }
public void WriteLayoutData(string folderName, byte[] data, bool clearing) { if (clearing || !AllowSaveOrRestore(folderName)) { return; } ElementLayoutData.GetLayoutData(folderName).Data = data; }
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); }