-
Notifications
You must be signed in to change notification settings - Fork 7
/
importportfolio.aspx
165 lines (158 loc) · 8.39 KB
/
importportfolio.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
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
164
165
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="importportfolio.aspx.cs" Inherits="Analytics.importportfolio" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<style>
.content {
width: 100%;
min-width: 50%;
}
</style>
<%--<h3 style="text-align: center; margin-top: 1%;">Download data for off-line mode</h3>--%>
<table style="width: 100%; border-color: black; border-style: solid; border-width: 1px;margin-top:2%;">
<tr>
<td colspan="3" style="text-align: center; border: solid; border-width: 1px; border-style: solid;">
<asp:Label ID="Label48" runat="server" Font-Size="Large" Text="Import Stock Portfolio"></asp:Label>
</td>
</tr>
<tr>
<td colspan="3" style="width: 100%; text-align: center;">
<asp:Label runat="server"> </asp:Label>
</td>
</tr>
<tr>
<td style="text-align: right; width: 50%;">
<asp:Label ID="Label2" runat="server" Style="text-align: right" Text="Select file:"></asp:Label>
</td>
<td>
<asp:FileUpload ID="FileUploadCSV" runat="server" />
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="width: 100%; text-align: center;">
<asp:Label runat="server"> </asp:Label>
</td>
</tr>
<tr>
<td style="width: 50%; text-align: right;">
<asp:Button ID="ButtonUpload" runat="server" Text="Import" TabIndex="2" OnClick="ButtonUpload_Click" />
</td>
<td style="text-align: left;">
<asp:Button ID="buttonBack" runat="server" Text="Back" TabIndex="3" OnClick="buttonBack_Click" />
</td>
<td></td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<asp:Label ID="labelMessage" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>
<%--<hr />--%>
<table style="width: 100%; border-color: black; border-style: solid; border-width: 1px;margin-top:1%;">
<tr>
<td style="width: 50%; text-align: right;">
<asp:Label ID="label4" runat="server" Text="Select Country"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlCountry" runat="server" AutoPostBack="True">
<asp:ListItem Text="India-BSE" Value=".BSE"></asp:ListItem>
<asp:ListItem Text="India-NSE" Value=".NSE"></asp:ListItem>
<asp:ListItem Text="USA" Value=""></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2" style="width: 100%; text-align: center;">
<asp:Label runat="server"> </asp:Label>
</td>
</tr>
<tr>
<td style="width: 50%; text-align: right;">
<asp:Label ID="label3" runat="server" Text="Select Source Column"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlSourceCols" runat="server" AutoPostBack="True"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2" style="width: 100%; text-align: center;">
<asp:Label runat="server"> </asp:Label>
</td>
</tr>
<tr>
<td style="width: 50%; text-align: right;">
<asp:Label ID="label1" runat="server" Text="Select Target Column"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlTargetCols" runat="server" AutoPostBack="True">
<asp:ListItem Text="Company Name" Value="companyname"></asp:ListItem>
<asp:ListItem Text="Purchase Date" Value="PurchaseDate"></asp:ListItem>
<asp:ListItem Text="Purchase Price" Value="PurchasePrice"></asp:ListItem>
<asp:ListItem Text="Purchase Qty" Value="PurchaseQty"></asp:ListItem>
<asp:ListItem Text="Commission Paid" Value="CommissionPaid"></asp:ListItem>
<asp:ListItem Text="Total Buy Value" Value="CostofInvestment"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2" style="width: 100%; text-align: center;">
<asp:Label runat="server"> </asp:Label>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<asp:Button ID="buttonMapSelected" runat="server" Text="Map Selected" OnClick="buttonMapSelected_Click" />
</td>
</tr>
<tr>
<td colspan="2" style="width: 100%;">
<asp:GridView ID="GridViewMapping" class="gridheader" Visible="true" Caption="Mapped Columns" runat="server" Height="10%" AutoGenerateColumns="False"
HorizontalAlign="Center" AllowPaging="True" PagerSettings-FirstPageText="First" PagerSettings-LastPageText="Last"
PagerSettings-Mode="NumericFirstLast" OnPageIndexChanging="GridViewMapping_PageIndexChanging"
PagerSettings-Position="TopAndBottom" ShowHeaderWhenEmpty="True">
<Columns>
<asp:BoundField HeaderText="Source Col" DataField="SourceCol" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundField>
<asp:BoundField HeaderText="Target Col" DataField="TargetCol" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundField>
</Columns>
<HeaderStyle HorizontalAlign="Center" />
<PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast"></PagerSettings>
<SelectedRowStyle BackColor="#999999" />
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<asp:Button ID="buttonConvert" runat="server" Text="Convert Data to Portfolio" OnClick="buttonConvert_Click" />
</td>
</tr>
</table>
<div style="overflow: scroll:">
<%--<td colspan="2" style="width: 100%;">--%>
<asp:GridView ID="GridViewMapped" class="gridheader" Visible="true" Caption="Mapped Data" runat="server" AutoGenerateColumns="False"
HorizontalAlign="Center" AllowPaging="True" PagerSettings-FirstPageText="First" PagerSettings-LastPageText="Last"
PagerSettings-Mode="NumericFirstLast" OnPageIndexChanging="GridViewMapped_PageIndexChanging"
PagerSettings-Position="TopAndBottom" ShowHeaderWhenEmpty="True">
<HeaderStyle HorizontalAlign="Center" />
<PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast"></PagerSettings>
<SelectedRowStyle BackColor="#999999" />
<Columns>
<asp:BoundField DataField="CompanyName" HeaderText="Comp Name" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Name" HeaderText="Symbol" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="PurchaseDate" HeaderText="Txn Date" SortExpression="PurchaseDate"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="PurchasePrice" HeaderText="Txn Price" SortExpression="PurchasePrice"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="PurchaseQty" HeaderText="Txn Quantity" SortExpression="PurchaseQty"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="CommissionPaid" HeaderText="Commission" SortExpression="CommissionPaid"
ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="CostofInvestment" HeaderText="Txn Cost" SortExpression="CostofInvestment"
ItemStyle-HorizontalAlign="Center" />
</Columns>
</asp:GridView>
</div>
</asp:Content>