-
Notifications
You must be signed in to change notification settings - Fork 1
/
ViewDataExporter.ascx
65 lines (60 loc) · 2.98 KB
/
ViewDataExporter.ascx
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
<%@ Control Language="C#" Inherits="forDNN.Modules.DataExporter.ViewDataExporter"
AutoEventWireup="true" CodeBehind="ViewDataExporter.ascx.cs" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<script type="text/javascript">
function sourceChanged()
{
var objSource = document.getElementById("<%=ddlSource.ClientID%>");
var objTables = document.getElementById("<%=ddlTables.ClientID%>");
var objViews = document.getElementById("<%=ddlViews.ClientID%>");
var objQuery = document.getElementById("<%=tbQuery.ClientID%>");
objTables.style["display"] = "none";
objViews.style["display"] = "none";
objQuery.style["display"] = "none";
switch (objSource.value)
{
case "0":
objTables.style["display"] = "block";
break;
case "1":
objViews.style["display"] = "block";
break;
case "2":
objQuery.style["display"] = "block";
break;
}
}
</script>
<div class="dnnClear dnnForm">
<fieldset>
<div class="dnnFormItem">
<dnn:Label runat="server" ID="lblSourceType" CssClass="SubHead" resourcekey="SourceType"></dnn:Label>
<asp:DropDownList runat="server" ID="ddlSource" CssClass="DropDownClass">
<asp:ListItem Selected="True" Value="0" resourcekey="Tables"></asp:ListItem>
<asp:ListItem Value="1" resourcekey="Views"></asp:ListItem>
<asp:ListItem Value="2" resourcekey="Query"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="dnnFormItem">
<dnn:Label runat="server" ID="lblSource" CssClass="SubHead" resourcekey="Source"></dnn:Label>
<asp:DropDownList runat="server" ID="ddlTables" CssClass="DropDownClass">
</asp:DropDownList>
<asp:DropDownList runat="server" ID="ddlViews" Style="display: none;" CssClass="DropDownClass">
</asp:DropDownList>
<asp:TextBox ID="tbQuery" runat="server" TextMode="MultiLine" CssClass="QueryClass"
Style="display: none;"></asp:TextBox>
</div>
<div class="dnnFormItem">
<dnn:Label runat="server" ID="ExportType" CssClass="SubHead" resourcekey="ExportType"></dnn:Label>
<asp:RadioButtonList runat="server" ID="rblExportType" RepeatDirection="Horizontal"
RepeatColumns="3" RepeatLayout="Table">
<asp:ListItem Selected="True" Value="0" resourcekey="Excel"></asp:ListItem>
<asp:ListItem Value="1" resourcekey="XML"></asp:ListItem>
<asp:ListItem Value="2" resourcekey="CSV"></asp:ListItem>
</asp:RadioButtonList>
</div>
</fieldset>
<asp:LinkButton ID="btnExport" runat="server" CssClass="dnnPrimaryAction" resourcekey="Export"
OnClick="btnExport_Click"></asp:LinkButton>
</div>
<asp:Label ID="lblIcon" runat="server"></asp:Label>