Advertisement
Guest User

Untitled

a guest
Nov 6th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 4.45 KB | None | 0 0
  1. <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
  2.  
  3. <asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
  4.  
  5.     <div class="jumbotron">
  6.         <h1>Ηλεκτρονικό Κατάστημα</h1>
  7.         <br />
  8.         <p>Επιλέξτε προιόν: </p>
  9.         <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1" AllowPaging="True" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None" PageSize="4" AllowSorting="True">
  10.             <AlternatingRowStyle BackColor="PaleGoldenrod" />
  11.             <Columns>
  12.                 <asp:BoundField DataField="Name" HeaderText="Όνομα" SortExpression="Name" DataFormatString=" {0:c}" />
  13.                 <asp:BoundField DataField="Price" HeaderText="Τιμή" SortExpression="Price" />
  14.                 <asp:CommandField SelectText="Λεπτομέρειες" ShowSelectButton="True" />
  15.             </Columns>
  16.             <FooterStyle BackColor="Tan" />
  17.             <HeaderStyle BackColor="Tan" Font-Bold="True" />
  18.             <PagerSettings Mode="NextPreviousFirstLast" NextPageText="Επόμενο" PreviousPageText="Προηγούμενο" />
  19.             <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
  20.             <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
  21.             <SortedAscendingCellStyle BackColor="#FAFAE7" />
  22.             <SortedAscendingHeaderStyle BackColor="#DAC09E" />
  23.             <SortedDescendingCellStyle BackColor="#E1DB9C" />
  24.             <SortedDescendingHeaderStyle BackColor="#C2A47B" />
  25.         </asp:GridView>
  26.         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringProd %>" SelectCommand="SELECT * FROM [Product] WHERE ([Available] = @Available)">
  27.             <SelectParameters>
  28.                 <asp:Parameter DefaultValue="True" Name="Available" Type="Boolean" />
  29.             </SelectParameters>
  30.         </asp:SqlDataSource>
  31.     </div>
  32.  
  33.     <div class="row">
  34.         <div class="col-md-4">
  35.             <h2>Ζητήσατε&nbsp;λεπτομέρειες&nbsp;για&nbsp;το&nbsp;προϊόν: </h2>
  36.             <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="216px" AutoGenerateRows="False" CellPadding="4" DataKeyNames="ProductID" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None">
  37.                 <AlternatingRowStyle BackColor="White" />
  38.                 <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />
  39.                 <EditRowStyle BackColor="#7C6F57" />
  40.                 <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
  41.                 <Fields>
  42.                     <asp:BoundField DataField="ProductID" HeaderText="Κωδικός" InsertVisible="False" ReadOnly="True" SortExpression="ProductID" />
  43.                     <asp:BoundField DataField="Name" HeaderText="Όνομα" SortExpression="Name" />
  44.                     <asp:BoundField DataField="Description" HeaderText="Περιγραφή" SortExpression="Description" />
  45.                     <asp:BoundField DataField="Price" DataFormatString="{0:c}" HeaderText="Τιμή" SortExpression="Price" />
  46.                     <asp:BoundField DataField="Quantity" HeaderText="Ποσότητα" SortExpression="Quantity" />
  47.                 </Fields>
  48.                 <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
  49.                 <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
  50.                 <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
  51.                 <RowStyle BackColor="#E3EAEB" />
  52.             </asp:DetailsView>
  53.             <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStringProd %>" SelectCommand="SELECT * FROM [Product] WHERE ([Available] = @Available)">
  54.                 <SelectParameters>
  55.                     <asp:Parameter DefaultValue="True" Name="Available" Type="Boolean" />
  56.                 </SelectParameters>
  57.             </asp:SqlDataSource>
  58.         </div>
  59.         <div class="col-md-4">
  60.             <p>
  61.                 Υποστήριξη
  62.             </p>
  63.             <img src="logo.png" />
  64.         </div>
  65.         <div class="col-md-4">
  66.         </div>
  67.     </div>
  68. </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement