-
Notifications
You must be signed in to change notification settings - Fork 1
/
employee.html
35 lines (27 loc) · 998 Bytes
/
employee.html
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
<!--
title: Employee Details
-->
<a id="back" href="javascript:history.back()">← Back</a>
{{#if id}}
{{ id | toInt | assignTo: id }}
{{ 'select * from "Employee" where "Id" = @id' | dbSingle({ id })
| assignTo: employee }}
{{#if employee}}
<table class="table table-bordered auto-width">
{{#tr {each:toList(employee)} }}
<tr><th>{{Key}}</th><td>{{Value}}</td>
{{/tr}}
</table>
{{ `select "TerritoryDescription", "RegionDescription"
from "EmployeeTerritory" et
inner join
"Territory" t on et."TerritoryId" = t."Id"
inner join
"Region" r on t."RegionId" = r."Id"
where et."EmployeeId" = @id`
| dbSelect({ id })
| htmlDump({ className: "table table-striped auto-width", caption: "Employee Territories"}) }}
{{else}}
{{ `No Employee has id: ${id}` }}
{{/if}}
{{/if}}