-
Notifications
You must be signed in to change notification settings - Fork 12
/
MapSettings.ascx.cs
40 lines (33 loc) · 994 Bytes
/
MapSettings.ascx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Exceptions;
using System.Web.UI.WebControls;
namespace Dnn.WebAnalytics
{
public partial class MapSettings : ModuleSettingsBase
{
protected TextBox txtGoogle;
public override void LoadSettings()
{
try {
if (!Page.IsPostBack) {
if (!string.IsNullOrEmpty((string)ModuleSettings["google_api_key"]))
{
txtGoogle.Text = (string)ModuleSettings["google_api_key"];
}
}
} catch (Exception exc) {
Exceptions.ProcessModuleLoadException(this, exc);
}
}
public override void UpdateSettings()
{
try {
ModuleController.Instance.UpdateModuleSetting(ModuleId, "google_api_key", txtGoogle.Text);
}
catch (Exception exc) {
Exceptions.ProcessModuleLoadException(this, exc);
}
}
}
}