Beispiel #1
0
        public ActionResult Xml(string dashboardId)
        {
            IDashboardStorage st = DevExpress.PublicDemo.SessionDashboardStorage.Instance as IDashboardStorage;

            if (string.IsNullOrEmpty(dashboardId))
            {
                IEnumerable <DashboardInfo> dashboards = st.GetAvailableDashboardsInfo();
                dashboardId = ((DashboardInfo)dashboards.ElementAt(0)).ID;
            }
            XDocument    xdoc   = st.LoadDashboard(dashboardId);
            MemoryStream stream = new MemoryStream();

            xdoc.Save(stream);
            stream.Seek(0, SeekOrigin.Begin);

            return(File(stream, System.Net.Mime.MediaTypeNames.Application.Octet, dashboardId + ".xml"));
        }
Beispiel #2
0
 /// <summary>
 /// Specifies a custom storage of dashboards for the Web Dashboard.
 /// </summary>
 /// <param name="dashboardStorage">An object implementing the DevExpress.DashboardWeb.IDashboardStorage
 /// interface that is the custom storage of dashboards.</param>
 public void SetDashboardStorage(IDashboardStorage dashboardStorage)
 {
     this._dashboardStorage = dashboardStorage;
     Update();
 }