forked from microsoftgraph/aspnet-snippets-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_ResultsPartial.cshtml
59 lines (56 loc) · 2.12 KB
/
_ResultsPartial.cshtml
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
<!-- Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
See LICENSE in the source repository root for complete license information. -->
@using Resources;
@model Microsoft_Graph_ASPNET_Snippets.Models.ResultsViewModel
<div class="col-md-12">
<h3>Results:</h3>
<div class="col-md-12">
@if (Model != null)
{
if (Model.Items.Any())
{
foreach (var item in Model.Items)
{
if (Model.Selectable)
{
<label>
<input type="radio" name="items" [email protected] onclick="onSelectedItemChanged()" />
@item.Display
</label><br />
}
else
{
<label>
@item.Display
</label><br />
}
if (item.Properties.Count > 0)
{
<table id="entity">
@foreach (var property in item.Properties)
{
<tr>
@if (property.Key != "Stream")
{
<td class="pad">@property.Key</td>
<td>@property.Value</td>
}
else if (property.Value != null)
{
<td><img src="@String.Format("data:image;base64,{0}", Convert.ToBase64String(property.Value as byte[]))" /></td>
}
</tr>
}
</table>
<br />
}
}
}
else
{
<p>@Resource.No_Results</p>
}
}
<br />
</div>
</div>