forked from sachatrauwaen/OpenContent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddEdit.ascx.cs
70 lines (61 loc) · 1.84 KB
/
AddEdit.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
64
65
66
67
68
69
#region Copyright
//
// Copyright (c) 2015-2016
// by Satrabel
//
#endregion
#region Using Statements
using System;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Localization;
using Satrabel.OpenContent.Components;
using Satrabel.OpenContent.Components.Manifest;
#endregion
namespace Satrabel.OpenContent
{
public partial class AddEdit : PortalModuleBase
{
#region Event Handlers
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
var settings = ModuleContext.OpenContentSettings();
Manifest manifest = settings.Manifest;
if (settings.TemplateKey.Extention != ".manifest")
{
manifest = ManifestUtils.GetFileManifest(settings.TemplateKey.TemplateDir);
}
if (manifest != null)
{
string addEditControl = manifest.AdditionalEditControl;
if (!string.IsNullOrEmpty(addEditControl))
{
var contr = LoadControl(addEditControl);
PortalModuleBase mod = contr as PortalModuleBase;
if (mod != null)
{
mod.ModuleConfiguration = this.ModuleConfiguration;
mod.ModuleId = this.ModuleId;
mod.LocalResourceFile = this.LocalResourceFile;
}
this.Controls.Add(contr);
}
}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!Page.IsPostBack)
{
}
}
#endregion
public string CurrentCulture
{
get
{
return LocaleController.Instance.GetCurrentLocale(PortalId).Code;
}
}
}
}