-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.ascx.cs
63 lines (53 loc) · 1.49 KB
/
Settings.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Exceptions;
using System;
using Ventrian.Modules.Subscriptions.Components.Entities;
namespace Ventrian.Modules.Subscriptions
{
public partial class Settings : ModuleSettingsBase
{
#region Private Members
private SubscriptionSettings _settings;
#endregion
#region Private Properties
private new SubscriptionSettings ModuleSettings
{
get
{
if (_settings == null)
_settings = SubscriptionSettings.Load(ModuleConfiguration);
return _settings;
}
set { _settings = value; }
}
#endregion
#region Base Method Implementations
public override void LoadSettings()
{
try
{
if (!Page.IsPostBack)
{
txtTemplate.Text = ModuleSettings.Template;
}
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
public override void UpdateSettings()
{
try
{
ModuleSettings.Template = txtTemplate.Text;
ModuleSettings.Save(ModuleConfiguration);
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
#endregion
}
}