-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDefault.aspx.cs
22 lines (18 loc) · 945 Bytes
/
Default.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using Storages;
using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
namespace AspDashboard_CustomExtension {
public partial class Default : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
}
protected void ASPxDashboard1_CustomDataCallback(object sender, DevExpress.Web.CustomDataCallbackEventArgs e) {
Dictionary<string, string> parameters = new JavaScriptSerializer().Deserialize<Dictionary<string, string>>(e.Parameter);
if (!parameters.ContainsKey("ExtensionName"))
return;
CustomDashboardFileStorage newDashboardStorage = new CustomDashboardFileStorage(@"~/App_Data/Dashboards");
if (parameters["ExtensionName"] == "dxdde-delete-dashboard" && parameters.ContainsKey("DashboardID"))
newDashboardStorage.DeleteDashboard(parameters["DashboardID"]);
}
}
}