-
Notifications
You must be signed in to change notification settings - Fork 0
/
order.aspx
107 lines (100 loc) · 7.22 KB
/
order.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
<%@ Page Title="" Language="C#" MasterPageFile="~/HeaderFooter.master" AutoEventWireup="true"
CodeFile="order.aspx.cs" Inherits="order" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:Label ID="lblMessage" runat="server" Font-Size="XX-Large" ForeColor="Red" Text="Your cart is empty"
Visible="False" style="padding-top: 500px;"></asp:Label>
<asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0"
OnFinishButtonClick="Wizard1_FinishButtonClick" StartNextButtonText="Payment"
Width="16px">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Step_1">
<asp:Repeater ID="Repeater12" runat="server"
OnItemCommand="Repeater12_ItemCommand">
<ItemTemplate >
<asp:Label ID="lblHiddenCartID" runat="server" Text='<%#Eval("CartID") %>' Visible="False"></asp:Label>
<div class="cartWizard">
<table cellspacing="40" class="tblCart">
<tr>
<td class="cartImageContainer">
<asp:Image ID="imgProductImage" ImageUrl='<%#Eval("ProductImageURL") %>' runat="server" />
</td>
<td>
<asp:Label ID="lblProductName" runat="server" Text='<%#Eval("ProductName") %>'></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlQuantity" runat="server" AutoPostBack = "true" OnSelectedIndexChanged = "OnSelectedIndexChanged">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
<asp:ListItem>4</asp:ListItem>
<asp:ListItem>5</asp:ListItem>
<asp:ListItem>6</asp:ListItem>
<asp:ListItem>7</asp:ListItem>
<asp:ListItem>8</asp:ListItem>
<asp:ListItem>9</asp:ListItem>
<asp:ListItem>10</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>12</asp:ListItem>
<asp:ListItem>13</asp:ListItem>
<asp:ListItem>14</asp:ListItem>
<asp:ListItem>15</asp:ListItem>
</asp:DropDownList>
</td>
<td>
*
</td>
<td>
<asp:Label ID="lblPrice" runat="server" Text='<%#"Rs. "+Eval("ProductPrice") %>'></asp:Label>
</td>
<td>
<asp:LinkButton ID="lnkRemoveItem" runat="server" Style="color: White; background: silver;
padding: 5px; border-radius: 5px" OnClick="lnkRemoveItem_Click" CausesValidation="False">X</asp:LinkButton>
</td>
</tr>
</table>
</div>
</ItemTemplate>
</asp:Repeater>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
<asp:Panel ID="Panel1" runat="server" DefaultButton="btnPay">
<div class="userForm">
<div class="formTitle">
CHECKOUT
</div>
<div class="formContent">
<asp:RadioButton ID="rdoDebitCard" Text="Debit Card" GroupName="card" runat="server"
OnCheckedChanged="rdoDebitCard_CheckedChanged" AutoPostBack="True" />
<asp:RadioButton ID="rdoCredit" Text="Credit Card" GroupName="card" runat="server"
AutoPostBack="True" OnCheckedChanged="rdoCredit_CheckedChanged" />
<asp:TextBox ID="txtCardNumber" placeholder="Your card Number" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtCardNumber"
Display="Dynamic" ErrorMessage="Please enter a valid card number." ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtCardNumber"
Display="Dynamic" ErrorMessage="Please fill 16 digit valid card number"
ForeColor="Red" ValidationExpression="^[0-9]{16}"></asp:RegularExpressionValidator>
<br />
<asp:TextBox ID="txtCVV" placeholder="CVV Code" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtCVV"
Display="Dynamic" ErrorMessage="CVV code is required" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCVV"
ErrorMessage="Please fill 3 digit valid CVV number" ForeColor="Red"
ValidationExpression="^[0-9]{3}"></asp:RegularExpressionValidator>
<br />
<asp:TextBox ID="txtAmount" placeholder="Amount to pay" Enabled="false" runat="server"></asp:TextBox>
<asp:Label ID="lblStatus" runat="server" Text="" ForeColor="Green"></asp:Label>
<asp:Button ID="btnPay" runat="server" Text="Pay" OnClick="btnPay_Click" />
</div>
</div>
</asp:Panel>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep3" runat="server" Title="Step 3" >
<asp:Panel ID="Panel3" runat="server" CssClass="panelInvoice" >
<asp:Button ID="Button1" Text="Generate Invoice" OnClick="GenerateInvoicePDF" runat="server" CssClass="Button1" />
</asp:Panel>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="head">
</asp:Content>