-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cards.aspx
163 lines (161 loc) · 7.58 KB
/
Cards.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
<%@ Page Title="Карты" Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Cards.aspx.cs" Inherits="Cards" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="Server">
<asp:DataList ID="CardsList" runat="server" DataSourceID="SqlCards"
DataKeyField="card_id" OnSelectedIndexChanged="CardsList_SelectedIndexChanged"
OnPreRender="CardsList_PreRender" ShowFooter="False">
<HeaderTemplate>
Подключенные карты
</HeaderTemplate>
<ItemTemplate>
<b>
<%# Eval("card_number") %></b>
<%# Eval("card_type_name") %>
<%# Eval("exp_date", "{0:MM'/'yy}") %><br />
<small><center><font color=gray>(Статус: <%# Eval("card_status") %>)</font></center></small>
<table width="100%">
<tr>
<td>
Доступно:
</td>
<td align="right">
<b><%# Eval("amount_available", "{0:F2}") %></b>
<%# Eval("card_currency") %>
</td>
</tr>
<tr>
<td>
Блокир.:
</td>
<td align="right">
<b><%# Eval("amount_on_hold", "{0:F2}") %></b>
<%# Eval("card_currency") %>
</td>
</tr>
<tr>
<td>
Задолж.:
</td>
<td align="right">
<b><%# Eval("amount_debt", "{0:F2}") %></b>
<%# Eval("card_currency") %>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<asp:Button ID="MoreButton" runat="server" Text="Подробнее" CommandName="select" /></div>
</td>
</tr>
</table>
</ItemTemplate>
<FooterTemplate>
Вы подключились к системе, но, как видно, у Вас нет на данный
момент подключенных карт, которые были бы сейчас действительны.
<br />
Пожалуйста, позвоните в Банк и уточните этот вопрос.
</FooterTemplate>
</asp:DataList>
<asp:DataList ID="TransList" runat="server" DataSourceID="SqlTrans"
Width="100%" >
<HeaderTemplate>
Операции за
<%# RepDate.ToString("MMMM yy") %>
<asp:Button ID="FilterButton1" runat="server" Text="<<" CommandName="prev"
CommandArgument="-1" OnCommand="FilterButton_Command" />
<asp:Button ID="FilterButton2" runat="server" Text=">>" CommandName="next"
CommandArgument="1" OnCommand="FilterButton_Command" />
<asp:Button ID="FilterButton3" runat="server" Text=">|" CommandName="today"
CommandArgument="0" OnCommand="FilterButton_Command" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Date" runat="server" Text='<%# Eval("transaction_date", "{0:dd.MM}") %>' />
<asp:Label ID="Sum" runat="server" Text='<%# Eval("amount", "{0:F2}") %>' Font-Bold="true"
/><asp:Label ID="Cur" runat="server" Text='<%# Eval("operation_currency_iso") %>' />
<table>
<tr>
<td>
<%# Eval("comment") %>
</td>
</tr>
</table>
</ItemTemplate>
<FooterTemplate>
Итого операций:
<%# TransList.Items.Count.ToString() %>
</FooterTemplate>
</asp:DataList>
<asp:DataList ID="HoldsList" runat="server" DataSourceID="SqlHolds"
OnPreRender="HoldsList_PreRender" ShowHeader="False" Width="100%">
<HeaderTemplate>
Блокировки по карте
</HeaderTemplate>
<ItemTemplate>
<%# Eval("operation_date", "{0:dd.MM}")%>
<b><%# Eval("amount", "{0:F2}") %></b>
<%# Eval("operation_currency_iso") %>
<table>
<tr>
<td>
<%# Eval("comment") %>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
<asp:DetailsView ID="DetailDebts" runat="server" AutoGenerateRows="False"
DataSourceID="SqlDebts">
<HeaderTemplate>
Задолженность по валютам
</HeaderTemplate>
<Fields>
<asp:BoundField DataField="amount_810" DataFormatString="{0:F2}RUR"
HeaderText="Рубли РФ:" SortExpression="amount_810">
<ItemStyle HorizontalAlign="Right" Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="amount_840" DataFormatString="{0:F2}USD"
HeaderText="Доллары США:" SortExpression="amount_840">
<ItemStyle HorizontalAlign="Right" Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="amount_978" DataFormatString="{0:F2}EUR"
HeaderText="Евро:" SortExpression="amount_978">
<ItemStyle HorizontalAlign="Right" Wrap="False" />
</asp:BoundField>
</Fields>
</asp:DetailsView>
<br />
<asp:Button ID="BackButton" runat="server" Text="Карты" OnClick="BackButton_Click"
Visible="False" />
<asp:SqlDataSource ID="SqlCards" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionDataMart %>"
SelectCommand="wsp_dm_pc_get_cards_num" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="client_login" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlTrans" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionDataMart %>"
SelectCommand="wsp_dm_pc_get_operations" SelectCommandType="StoredProcedure"
FilterExpression="transaction_date>='{0}' and transaction_date<'{1}'">
<SelectParameters>
<asp:Parameter Name="client_login" Type="String" />
<asp:ControlParameter ControlID="CardsList" Name="card_id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlHolds" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionDataMart %>"
SelectCommand="wsp_dm_pc_get_on_hold" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="client_login" Type="String" />
<asp:ControlParameter ControlID="CardsList" Name="card_id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDebts" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionDataMart %>"
SelectCommand="wsp_dm_pc_get_debt" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="client_login" Type="String" />
<asp:ControlParameter ControlID="CardsList" Name="card_id" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Content>