-
Notifications
You must be signed in to change notification settings - Fork 20
/
FieldEditor.ascx.cs
38 lines (34 loc) · 1.25 KB
/
FieldEditor.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
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DotNetNuke.Modules.UserDefinedTable.Components;
using DotNetNuke.UI.Modules;
namespace DotNetNuke.Modules.UserDefinedTable
{
public partial class FieldEditor : ModuleUserControlBase
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Field.HideField += Field_HideField;
var fieldId = Request.QueryString["fieldId"];
var fields = FieldController.GetFieldsTable(ModuleContext.ModuleId, fieldId=="-1" );
var filter = string.Format("{0}={1}", FieldsTableColumn.Id, fieldId);
Field.DataSource = new DataView(fields, filter, "", DataViewRowState.CurrentRows)[0];
var fieldSettings = FieldSettingsController.GetFieldSettingsTable(ModuleContext.ModuleId);
Field.Settings = fieldSettings;
Field.Bind();
Field.Visible = true;
Field.LocalizeString = LocalizeString;
Field.ModuleContext = ModuleContext;
}
void Field_HideField()
{
Response.Redirect(ModuleContext.EditUrl("Manage"));
}
}
}