-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cousins.aspx
100 lines (90 loc) · 4.89 KB
/
Cousins.aspx
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
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Cousins.aspx.cs" Inherits="Cousins" %>
<%@ Import Namespace="System.Linq" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 3.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3404660-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
var host = window.location.hostname;
if (host != "localhost") {
gtag('js', new Date());
gtag('config', 'UA-3404660-2');
}
</script>
<title><%if (_PersonInfo != null) { Response.Write(_PersonInfo.FullName); } %></title>
<link href="css/TreeTemplate.css" rel="stylesheet" />
<link href="css/NavBarStyleSheet.css" rel="stylesheet" />
</head>
<body bgcolor="#ccffcc">
<div align="right">
<asp:Label ID="lblLogin" EnableViewState="false" runat="server" Text="Label"></asp:Label>
</div>
<form id="form1" runat="server">
<table border="1" cellpadding="10" cellspacing="0" width="100%">
<tr>
<!--#include virtual="NavBar.inc"-->
<td>
<div style="padding-left:20px;"><%Response.Write(ExtMethods.Bold("Cousins of: ") + ExtMethods.Hyperlink(_PersonInfo.FullName, "./PersonInfo.aspx?PersonId=" + _PersonInfo.PersonID));%>
<table><tr><td>
<%
Response.Write("<br/>");
if (_PersonInfo != null && _PersonInfo.FatherID > 0 && _PersonInfo.Father.Siblings != null)
{
//Cousins from Father side
ExtMethods.WriteLine(Response, "Father Side");
foreach (PersonInfo fatherSibling in _PersonInfo.Father.Siblings)
{
var cousins = fatherSibling.AllChildren;
if (cousins != null)
{
Response.Write("<ul>");
Response.Write("<li>" + ExtMethods.Hyperlink(fatherSibling.FullName, "./PersonInfo.aspx?PersonId=" + fatherSibling.PersonID));
Response.Write("<ul>");
foreach (PersonInfo cousin in cousins)
{
Response.Write("<li>" + ExtMethods.Hyperlink(cousin.FullName, "./PersonInfo.aspx?PersonId=" + cousin.PersonID) + "</li>");
}
Response.Write("</li>");
Response.Write("</ul>");
Response.Write("</ul>");
}
}
}
if (_PersonInfo != null && _PersonInfo.Mother != null && _PersonInfo.Mother.Siblings != null)
{
//Cousins from Mother side
ExtMethods.WriteLine(Response, "Mother Side");
foreach (PersonInfo motherSibling in _PersonInfo.Mother.Siblings)
{
var cousins = motherSibling.AllChildren;
if (cousins != null)
{
Response.Write("<ul>");
Response.Write("<li>" + ExtMethods.Hyperlink(motherSibling.FullName, "./PersonInfo.aspx?PersonId=" + motherSibling.PersonID));
Response.Write("<ul>");
foreach (PersonInfo cousin in cousins)
{
Response.Write("<li>" + ExtMethods.Hyperlink(cousin.FullName, "./PersonInfo.aspx?PersonId=" + cousin.PersonID) + "</li>");
}
Response.Write("</li>");
Response.Write("</ul>");
Response.Write("</ul>");
}
}
}
%>
</td></tr></table>
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br />
</form>
</body>
</html>