-
-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathConditionalTablesExport.aspx
More file actions
96 lines (78 loc) · 3.2 KB
/
Copy pathConditionalTablesExport.aspx
File metadata and controls
96 lines (78 loc) · 3.2 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<%@ Page Title="" Async="true" Language="C#" MasterPageFile="~/masterPage1.Master" AutoEventWireup="true" CodeBehind="ConditionalTablesExport.aspx.cs" Inherits="System.pages.ConditionalTablesExport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
.maintb {
margin-top: 20px;
}
.maintb table {
border-collapse: collapse;
}
.maintb tr {
height: 50px;
}
.maintb th {
padding: 10px;
background: #235a82;
color: white;
border: 1px solid #a3a3a3;
}
.maintb tr th:nth-child(3) {
width: 620px;
}
.maintb td {
padding: 0 10px;
border: 1px solid #c8c8c8;
}
.maintb input[type=text] {
width: 600px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<!-- Prevent implicit submission of the form -->
<button type="submit" disabled style="display: none" aria-hidden="true"></button>
<div class="div-center-framed-content">
<h1>Conditional Tables' Rows Export</h1>
<asp:Button ID="btExport" runat="server" Text="Export" OnClick="btExport_Click" ClientIDMode="Static" OnClientClick="return validateExport();" />
<asp:Button ID="btFetchTables" runat="server" Text="Fetch Tables" OnClick="btFetchTables_Click" />
<asp:CheckBox ID="cbRunWithoutTryCatch" runat="server" /> Run Without Try Catch <br />
*This will create a record at [<a href="/DatabaseRecordList">Database Record</a>]
<div class="maintb" id="maintb">
<asp:PlaceHolder ID="ph1" runat="server"></asp:PlaceHolder>
</div>
</div>
<script>
function hidePanels() {
const btExport = document.getElementById("btExport");
const maintb = document.getElementById("maintb");
btExport.style.display = "none";
maintb.style.display = "none";
showBigLoading(0);
}
function validateExport() {
const checkboxes = document.querySelectorAll('#maintb_body input[type="checkbox"]');
const anyChecked = Array.from(checkboxes).some(checkbox => checkbox.checked);
if (!anyChecked) {
showMessage("Task Cancelled", "Please select at least one table.", false);
return false;
}
return true;
}
function toggleSelectAll(cb) {
const checkboxes = maintb.querySelectorAll('#maintb input[type="checkbox"]');
const inputSqls = maintb.querySelectorAll("#maintb input[type='text']");
checkboxes.forEach(checkbox => {
checkbox.checked = cb.checked;
});
inputSqls.forEach(inputSql => {
inputSql.style.display = cb.checked ? "block" : "none";
});
}
function enableTable(cb, tableName) {
const inputSql = document.getElementById(tableName);
if (inputSql) {
inputSql.style.display = cb.checked ? 'block' : 'none';
}
}
</script>
</asp:Content>