-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddTestControl.ascx
163 lines (158 loc) · 6.98 KB
/
AddTestControl.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddTestControl.ascx.cs" Inherits="AddTestControl" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<div align="left" style="padding-top: 10px">
<table>
<tr>
<td align="left" valign="top">
<table >
<tr>
<td colspan="3"
valign="top">
<div class="titlemain">
Add Test</div>
</td>
</tr>
<tr>
<td class="label">
<asp:Label ID="lblOrganization" runat="server" Text="Organization"></asp:Label>
</td>
<td colspan="2">
<asp:DropDownList ID="ddlOrganizations" runat="server"
AppendDataBoundItems="True" AutoPostBack="True"
DataSourceID="LinqOrganizationList" DataTextField="Name"
DataValueField="OrganizationID"
onselectedindexchanged="ddlOrganizations_SelectedIndexChanged"
Width="502px">
<asp:ListItem Value="0">-- Select --</asp:ListItem>
</asp:DropDownList>
<asp:LinqDataSource ID="LinqOrganizationList" runat="server"
ContextTypeName="AssesmentDataClassesDataContext"
Select="new (Name, OrganizationID)" TableName="Organizations"
Where="Status == @Status && AdminAccess == @AdminAccess">
<WhereParameters>
<asp:Parameter DefaultValue="1" Name="Status" Type="Int32" />
<asp:Parameter DefaultValue="1" Name="AdminAccess" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
</td>
</tr>
<tr>
<td class="label">
Test Name</td>
<td colspan="2">
<asp:TextBox ID="txtTestName" runat="server" Width="500px" MaxLength="299"></asp:TextBox>
</td>
</tr>
<tr>
<td class="label">
Report Type</td>
<td>
<asp:DropDownList ID="ddlReportType" runat="server">
<asp:ListItem Value="0">-- Select --</asp:ListItem>
<asp:ListItem>Interpretative Report</asp:ListItem>
<asp:ListItem>Indicative Report</asp:ListItem>
<asp:ListItem>Certification Report</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:CheckBox ID="chbGroupReport" runat="server" Text="Group Report Access" />
</td>
</tr>
<tr>
<td class="label">
Instructions</td>
<td colspan="2">
<FTB:FreeTextBox ID="FreeTextBox1" runat="Server" Height="300px" Text=""
Width="525px"
ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu|Bold,Italic,Underline,Strikethrough;Superscript,Subscript,RemoveFormat"
ToolbarStyleConfiguration="NotSet"
UpdateToolbar="True"></FTB:FreeTextBox></td>
</tr>
<tr>
<td>
Status</td>
<td colspan="2">
<asp:DropDownList ID="ddlStatus" runat="server" Width="128px">
<asp:ListItem Value="1">Active</asp:ListItem>
<asp:ListItem Value="0">Inactive</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
<asp:Label ID="lblMessage" runat="server" ForeColor="#CC3300"></asp:Label>
</td>
</tr>
<tr>
<td>
</td>
<td colspan="2">
<table style="width: 200px;">
<tr>
<td>
<asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="Submit" />
</td>
<td>
<asp:Button ID="btnClear" runat="server" onclick="btnClear_Click"
Text="Reset" />
</td>
<td>
<asp:Button ID="btnDelete" runat="server" onclick="btnDelete_Click"
Text="Delete" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td colspan="3">
<asp:Panel ID="Panel1" runat="server" Height="150px" HorizontalAlign="Left"
ScrollBars="Auto" Width="650px">
<asp:GridView ID="gvwTestLists" runat="server" AutoGenerateColumns="False"
BackColor="#E2E2E2" GridLines="None"
onselectedindexchanged="gvwTestLists_SelectedIndexChanged" PageSize="20">
<Columns>
<asp:CommandField ShowSelectButton="True" SelectText="Edit" />
<asp:BoundField DataField="OrganizationName" HeaderText="OrganizationName"
ReadOnly="True" SortExpression="OrganizationName" />
<asp:BoundField DataField="TestName" HeaderText="TestName" ReadOnly="True"
SortExpression="TestName" />
<asp:BoundField DataField="PassMark" ReadOnly="True"
SortExpression="PassMark" >
<ItemStyle Font-Size="1px" ForeColor="#E2E2E2" Width="1px" />
</asp:BoundField>
<asp:BoundField DataField="Status" ReadOnly="True" SortExpression="Status">
<ItemStyle Font-Size="1px" ForeColor="#E2E2E2" Width="1px" />
</asp:BoundField>
<asp:BoundField DataField="TestId" ReadOnly="True" SortExpression="TestId"
HeaderText="Test ID">
</asp:BoundField>
</Columns>
</asp:GridView>
<asp:LinqDataSource ID="LinqTestDetails" runat="server"
ContextTypeName="AssesmentDataClassesDataContext"
Select="new (TestId, TestName, OrganizationName, Status, Instructions, Description, PassMark)"
TableName="TestLists">
</asp:LinqDataSource>
</asp:Panel>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>