Skip to content

Commit 059b4d5

Browse files
committed
add purchased docs to profile.
1 parent fc882d5 commit 059b4d5

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Themes/Default/Default/Profileform.cshtml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
@AddMetaData("resourcepath", "/DesktopModules/NBright/NBrightBuy/App_LocalResources/")
1111

1212
@{
13-
// assign Model, so we can resolve var in VS
14-
var info = (NBrightInfo)Model.List.First();
13+
// assign Model, so we can resolve var in VS
14+
var info = (NBrightInfo)Model.List.First();
15+
var uData = new UserData();
16+
1517
}
1618

1719
<!-- Client Menu -->
@@ -43,5 +45,28 @@ var info = (NBrightInfo)Model.List.First();
4345
</div>
4446

4547
</div>
48+
<div class="documents">
49+
<table>
50+
<tbody>
51+
@foreach (var purchaseddoc in uData.DocList)
52+
{
53+
var productid = purchaseddoc.Value.GetXmlPropertyInt("genxml/productid");
54+
var productData = new ProductData(productid, Utils.GetCurrentCulture());
55+
NBrightInfo doc = null;
56+
foreach (var d in productData.Docs)
57+
{
58+
if (d.GetXmlProperty("genxml/hidden/filename") == purchaseddoc.Value.GetXmlProperty("genxml/filename"))
59+
{
60+
doc = d;
61+
}
62+
}
63+
if (doc != null)
64+
{
65+
<tr><td><i class='fa fa-file-pdf-o fa-lg'></i><a href='/DesktopModules/NBright/NBrightBuy/XmlConnector.ashx?cmd=docdownload&[email protected]("genxml/textbox/txtfilename")&[email protected]("genxml/hidden/filerelpath")' title='@doc.GetXmlProperty("genxml/textbox/txtdocdesc")'>@doc.GetXmlProperty("genxml/textbox/txttitle")</a></td></tr>
66+
}
67+
}
68+
</tbody>
69+
</table>
70+
</div>
4671

4772
<div class="clearfix"></div>

0 commit comments

Comments
 (0)