Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/Bin/Extensions/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/Silverlight/Bin/Extensions/DesignerReportStore.cs

using System.ComponentModel.Composition;
using System.Web;
using System.Web.SessionState;
using DevExpress.XtraReports.Service.Extensions;

namespace ReportSilverlightDemo.Extensions {
    [Export(typeof(IDesignerReportStore))]
    public class DesignerReportStore : IDesignerReportStore {
        const string ReportLayoutNamePrefix = "ReportLayout:";

        static HttpSessionState HttpSession {
            get { return HttpContext.Current.Session; }
        }

        #region IDesignerReportStore Members
        byte[] IDesignerReportStore.LoadLayout(string reportName) {
            return (byte[])HttpSession[ReportLayoutNamePrefix + reportName];
        }

        void IDesignerReportStore.SaveLayout(string reportName, byte[] layoutData) {
            HttpSession[ReportLayoutNamePrefix + reportName] = layoutData;
        }
        #endregion
    }
}