0% found this document useful (0 votes)
2 views

558_asp

The document outlines a project for a Restaurant Management System developed in ASP.NET, detailing its structure and components. It includes a master page, home page, menu page, and various sections such as login, registration, and contact information. The project is organized with an index and provides code snippets for the implementation of the website's layout and functionality.

Uploaded by

kenilgolakiya6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

558_asp

The document outlines a project for a Restaurant Management System developed in ASP.NET, detailing its structure and components. It includes a master page, home page, menu page, and various sections such as login, registration, and contact information. The project is organized with an index and provides code snippets for the implementation of the website's layout and functionality.

Uploaded by

kenilgolakiya6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Name : Kapadiya Tirth P.

Roll no : 558

Subject : 505- ASP.NET

Class : TYBCA (Sem-5)

INDEX

No Content Page No
1 Master Page 1

2 Home 3

3 Menu 9

4 Franchise 12

5 About 16

6 Contact 19

7 Login 22

8 Registration 26

9 Add Item 31

10 Web Config File 37

Signature: ________________

Date: ________________
RESTAURENT MANGEMENT SYSTEM

MASTER PAGE

<%@ Master Language="VB" AutoEventWireup="false"


CodeBehind="Site1.master.vb" Inherits="website.Site1" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
body {
padding: 0%;
margin: 0%;
}
.table-header {
width: 100%;
height: 81px;
background-color: #212529;
}
.footer-text {
font-size: 18px;
}
.footer {
text-align: center;
color: #FFFFFF;
background-color: #212529;
}
.column-2 {
width: 379px;
color: #FFFFFF;
}
.column-1 {
width: 174px;
}
.text-header {
font-size: x-large;
}
.logo {
font-size: 44px;
}
</style>

TYBCA 558 [ASP.NET] 1


RESTAURENT MANGEMENT SYSTEM

</head>
<body >
<form id="form1" runat="server">
<div>
<table class="table-header">
<tr>
<td class="column-1">
<h1 style="padding: 0px; margin: 0px; font-weight:
400; line-height: 1; color: rgb(171, 139, 101); font-family: 'Segoe UI',
Tahoma, Geneva, Verdana, sans-serif; text-align: center; width: 321px;"
class="logo">FOOD CASTLE</h1>
</td>
<td class="column-2">
&nbsp;<span class="text-header">RESTAURENT MANGEMENT
SYSTEM&nbsp;</span></td>
</tr>
</table>
<asp:Menu ID="Navbar" runat="server" Orientation="Horizontal"
Width="100%" style="color: #FFFFFF; background-color: #212529">
<Items>
<asp:MenuItem Text="HOME" Value="HOME"
NavigateUrl="~/home.aspx" Selected="True"></asp:MenuItem>
<asp:MenuItem Text="MENU" Value="MENU"
NavigateUrl="~/menu.aspx"></asp:MenuItem>
<asp:MenuItem Text="FRANCHISE" Value="FRANCHISE"
NavigateUrl="~/franchise.aspx"></asp:MenuItem>
<asp:MenuItem Text="ABOUT" Value="ABOUT"
NavigateUrl="~/about.aspx"></asp:MenuItem>
<asp:MenuItem Text="CONTACT" Value="CONTACT"
NavigateUrl="~/contact.aspx"></asp:MenuItem>
<asp:MenuItem Text="LOGIN" Value="LOGIN"
NavigateUrl="~/login.aspx"></asp:MenuItem>
<asp:MenuItem Text="REGISTRATION" Value="REGISTRATION"
NavigateUrl="~/registration.aspx"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/additem.aspx" Text="ADD ITEM"
Value="ADD ITEM"></asp:MenuItem>
</Items>
<StaticHoverStyle ForeColor="#AB8B65" />
<StaticMenuItemStyle HorizontalPadding="30px"
ForeColor="White" VerticalPadding="10px" />
</asp:Menu>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<div class="footer">
<span class="footer-text">
© Copyright 2023 Food Castle Restau<span> Essendon</span><br />
</span>
</div>
</div>
</form>
</body>
</html>

TYBCA 558 [ASP.NET] 2


RESTAURENT MANGEMENT SYSTEM

HOME PAGE

TYBCA 558 [ASP.NET] 3


RESTAURENT MANGEMENT SYSTEM

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="home.aspx.vb"
Inherits="website.home" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
body {
font-family: Arial, sans-serif;
}

.content-section {
width: 504px;
margin: 20px auto;
}

.text-center {
text-align: center;
}

.event-table {
padding-top: 20px;
width: 100%;
height: 54px;
}

.event-cell {
width: 451px;
height: 274px;
}

.event-cell-medium {
width: 400px;
height: 274px;
}

.event-cell-small {
height: 274px;
}

.event-section {
padding: 50px;
width: 1284px;
margin: 0 auto;
}

.event-details {
padding: 20px;
}

.section-title {
font-weight: 500;
line-height: 1.2;
font-size: 2rem;
width: 518px;

TYBCA 558 [ASP.NET] 4


RESTAURENT MANGEMENT SYSTEM

margin: 0;
}

.section-paragraph {
padding: 8px 0 0;
line-height: 25px;
width: 532px;
margin: 0;
}

.auto-style1 {
text-align: center;
}

.auto-style2 {
width: 576px;
padding-left: 60px;
}

.imgwidth {
margin: 20px auto;
width: 1109px;
height: 500px;
display: block;
}

.welcome-section {
background-color: #f5f5f5;
padding: 90px;
text-align: center;
margin-bottom: 20px;
}

.welcome-section h1 {
font-size: 2.5rem;
margin-bottom: 20px;
}

.welcome-section p {
font-size: 1.1rem;
line-height: 1.6;
}

.btn-custom {
background-color: #212529;
color: #fff;
padding: 10px 20px;
text-decoration: none;
font-size: 1rem;
border-radius: 5px;
}

.menu-section {

TYBCA 558 [ASP.NET] 5


RESTAURENT MANGEMENT SYSTEM

background-color: #f9f9f9;
padding: 60px;
text-align: center;
margin-bottom: 20px;
}

.menu-section h2 {
font-size: 2rem;
margin-bottom: 20px;
}

.menu-section p {
font-size: 1.1rem;
line-height: 1.8;
}

.menu-section img {
width: 380px;
height: 245px;
border-radius: 10px;
margin: 10px;
}

.testimonial-section {
background-color: #fff;
padding: 60px;
text-align: center;
margin-bottom: 20px;
}

.testimonial-section h2 {
font-size: 2rem;
margin-bottom: 20px;
}

.testimonial-section p {
font-size: 1.1rem;
line-height: 1.8;
}

</style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


runat="server">

<!-- Welcome Section -->


<div class="welcome-section">
<h1>Welcome to Our Restaurant</h1>
<p>Experience the best dining in town. Whether it's a special
occasion or just a casual outing, our restaurant offers an unforgettable
experience with a wide range of dishes and a cozy atmosphere.</p>
<a href="menu.aspx" class="btn-custom">Explore Our Menu</a>

TYBCA 558 [ASP.NET] 6


RESTAURENT MANGEMENT SYSTEM

</div>

<!-- Enjoy The Best Food Section -->


<table class="event-section">
<tr>
<td class="auto-style2">
<h2 class="section-title header-large">Enjoy The Best
Food</h2>
<p class="section-paragraph">
Fresh &amp; superior quality ingredients are used to
create innovative dishes and beverages that taste &amp; look distinctive
and incite fascination. From the lighting to the curated music, from free-
walk spaces to the seating, we formulate an aesthetic as a whole so the
final picture at the end is nothing short of marvelous!
</p>
<asp:Button PostBackUrl="~/about.aspx" ID="btnknowus"
runat="server" Height="35px" Text="KNOW US" Width="95px" />
<br />
</td>
<td class="auto-style1">
<asp:Image ID="Image1" runat="server" Height="298px"
ImageUrl="~/Photos/img1.jpg" Width="553px" style="text-align: justify" />
</td>
</tr>
</table>
<br />

<!-- Menu Highlights Section -->


<div class="menu-section">
<h2>Menu Highlights</h2>
<p>Discover some of our most popular dishes. Each item is crafted
with care and served with love.</p>
<asp:Image ID="menuImg1" runat="server"
ImageUrl="~/Images/mexico.jpg" />
<asp:Image ID="menuImg2" runat="server"
ImageUrl="~/Images/pasta.jpg" />
<asp:Image ID="menuImg3" runat="server"
ImageUrl="~/Images/pizza.jpg" />
</div>

<!-- Featured Image Section -->


<hr style="width: 1182px;" />
<br />
<div class="event">
<div style="text-align: center">
<asp:Image ID="imglong" runat="server" CssClass="imgwidth"
ImageUrl="~/Photos/img.png" />
</div>
</div>
<hr style="width: 1182px;" />
<br />

<!-- Book Your Event Section -->

TYBCA 558 [ASP.NET] 7


RESTAURENT MANGEMENT SYSTEM

<div class="event">
<h1 class="text-center">BOOK YOUR EVENT</h1>
<p class="text-center">Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod <br />tempor ut enim ad minim veniam, quis
nostrud</p>
<table align="center" class="event-table">
<tr>
<td align="center" class="event-cell">
<asp:Image ID="Image" runat="server" Height="425px"
ImageUrl="~/Photos/celebration.jpg" Width="325px" />
<br />
<h2>CELEBRATIONS</h2>
<p>Friday, 21 Nov <br />Reservations 12Pm To
1.30Pm</p>
</td>
<td align="center" class="event-cell-medium">
<asp:Image ID="Image2" runat="server" Height="425px"
ImageUrl="~/Photos/wedding.jpg" Width="325px" />
<br />
<h2>WEDDING</h2>
<p>Monday, 17 Nov <br />Reservations 12Pm To
1.30Pm</p>
</td>
<td align="center" class="event-cell-small">
<asp:Image ID="Image3" runat="server" Height="425px"
ImageUrl="~/Photos/corporate.jpg" Width="325px" />
<br />
<h2>CORPORATE</h2>
<p>Wednesday, 26 Nov <br />Reservations 3Pm To
5.30Pm</p>
</td>
</tr>
</table>
</div>

<!-- Testimonials Section -->


<div class="testimonial-section">
<h2>What Our Customers Say</h2>
<p>"The best dining experience I've had in years. The food was
incredible, and the ambiance was perfect." - Jane Doe</p>
<p>"Amazing service, delicious food, and a great place to relax
and enjoy a meal." - John Smith</p>
<p>"I can't recommend this restaurant enough. Everything from the
food to the service was top-notch." - Emily Johnson</p>
</div>

</asp:Content>

TYBCA 558 [ASP.NET] 8


RESTAURENT MANGEMENT SYSTEM

MENU PAGE

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="menu.aspx.vb"
Inherits="website.menu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
body {
font-family: Arial, sans-serif;
}

.datalist-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 20px;
background-color: #f8f8f8;
border-radius: 10px;

TYBCA 558 [ASP.NET] 9


RESTAURENT MANGEMENT SYSTEM

.datalist-item {
background-color: #fff;
border-radius: 10px;
overflow: hidden;
border: 2px solid black;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
width: 355px;
margin: 25px;
}

.datalist-item:hover {
transform: translateY(-5px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.datalist-image {
width: 100%;
height: 245px;
object-fit: cover;
}

.datalist-item p {
padding-left: 16px;
margin: 10px 1px;
font-size: 1.2em;
color: #333;
}

.datalist-item p.price {
font-weight: bold;
color: #d16527;
font-size: 1.1em;
}
</style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


runat="server">
<div class="datalist-container">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [FoodName], [Description], [Price], [ImagePath] FROM
[FoodItems]"></asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server"
DataSourceID="SqlDataSource1" RepeatColumns="3"
RepeatDirection="Horizontal">
<ItemTemplate>
<div class="datalist-item">
<asp:Image ID="Image3" runat="server" ImageUrl='<%#
Eval("ImagePath") %>' CssClass="datalist-image" />

TYBCA 558 [ASP.NET] 10


RESTAURENT MANGEMENT SYSTEM

<h2 class="food-name" style="padding-left: 16px">


<asp:Label ID="FoodNameLabel" runat="server"
Text='<%# Eval("FoodName") %>' />
</h2>
<p class="description">
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Eval("Description") %>' />
</p>
<p class="price">
<asp:Label ID="PriceLabel" runat="server"
Text='<%# Eval("Price") %>' />
</p>
</div>
</ItemTemplate>
</asp:DataList>
</div>
</asp:Content>

TYBCA 558 [ASP.NET] 11


RESTAURENT MANGEMENT SYSTEM

FRANCHISE PAGE

TYBCA 558 [ASP.NET] 12


RESTAURENT MANGEMENT SYSTEM

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="franchise.aspx.vb"
Inherits="website.franchise" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
body {
font-family: Arial, sans-serif;
}
.main {
padding-left: 100px;
padding-right: 100px;
}

.fr-head h2,
.fr-par h2 {
font-size: 35px;
font-family: 'Oswald', sans-serif;
line-height: 0.2;
font-weight: 700;
padding-top: 35px;
}

.fr-par h3 {
font-family: 'Oswald', sans-serif;
font-weight: 400;
font-size: 25px;
line-height: 32px;
color: #212529;
margin: 20px 0px 20px;
}

.fr-par p {
line-height: 24px;
font-size:17px;
color: #7e7e7e;
}

.fr-head hr, .fr-par hr {


margin: 0;
border-top: 3px solid #ab8b65;
width: 111.594px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<div class="main">
<div class="fr-head">
<h2>Franchise</h2>
<hr>
</div>
<div class="p1">

TYBCA 558 [ASP.NET] 13


RESTAURENT MANGEMENT SYSTEM

<p style="color: #7E7E7E">


Here you will find out our Culture, Community commitment.
If your ideology meets our vision, Coffee
Culture Offers you to be an owner of your own Outlet. We
do not sell franchise, we invite association of
Food and Beverage enthusiasts who are actually looking
forward to run their own F&B outlet with “Coffee
Culture”.
</p>
</div>
<div class="fr-par">
<h2>Franchise Models</h2>
<hr />
<h3>QUICK SERVICE RESTAURANT</h3>
<p>
Area: 1000 sq. ft. or more<br>
Preferred Locations: Highstreet, Malls<br>
Self Serviced Cafe<br>
Ambiance : Standard Theme
</p>

<p><strong style="color: #000000">MENU</strong></p>


<p>Beverage Menu : Hot Coffees, Cold Coffees, Shakes &
Coolers, Teas</p>
<p>Food Menu : Sizzler, Pizzas, Pastas,Rice, Burgers & Sides,
Sandwich, Breakfast Trays, Desserts</p>

<h3>SIZZLING CAFÉ</h3>
<p>
Area: 250 – 500 sq. ft.<br>
Preferred Locations: Food Court, Food Parks, Highways<br>
<p>Self Serviced Cafe</p>
<p>Food Court</p>
<p>Ambiance : Standard Theme</p>
<p>Menu : Hot Coffees, Cold Coffees, Sinful Shakes,
Sizzlers, Rice, Pastas, Desserts</p>

<h3>LOUNGE</h3>
<p>
Area: 1500 sq. ft. or more<br>
Preferred Locations: Highstreets, Malls, Office Areas,
etc.<br>
Ambiance : Local Culture Themed
</p>

<p><strong style="color: #000000">MENU</strong></p>


<p>
Beverage Menu ; Hot Coffees, Cold Coffees, Smoothies,
Mocktails, Teas, Freakshakes, Cold Press Juices,
Sinful Chocolate Shakes
</p>
<p>

TYBCA 558 [ASP.NET] 14


RESTAURENT MANGEMENT SYSTEM

Food Menu : Salads, Starters, Burgers, Pizzas,


Sizzlers, Pasta, Rice, Mexican, Italian, Desserts,
Waffles, Smoothie Bowls
</p>
<h3>RESERVE</h3>
<p>
Area: 500-1000 sq. ft.<br>
Preferred Locations: Highstreets<br>
Ambiance : Minimal
</p>

<p><strong style="color: #000000">MENU</strong></p>


<p>
Beverage Menu ; Hot Brews, Cold Brews, Manual Brews,
IceBlended Frappes, Classics, Hot Chocolates, Sinful
Chocolate Shakes
</p>
<p>Food Menu : Croissant, Bagels, Gooey Cookies, Smoothie
Bowls, Cheesecakes, Brownies</p>
<p>Retail : Coffee Beans, Home Brewing Equipments,
Sippers, Tumblers</p>

<h3>ROASTERY</h3>
<p>
1500+ sq. ft.<br>
Preferred Locations: Highstreets<br>
Ambiance : Minimal
</p>
<p><strong style="color: #000000">MENU</strong></p>
<p>
Beverage Menu ; Hot Brews, Cold Brews, Manual Brews,
IceBlended Frappes, Classics, Hot Chocolates, Sinful
Chocolate Shakes
</p>
<p>Food Menu : Croissant, Bagels, Gooey Cookies, Smoothie
Bowls, Cheesecakes, Brownies</p>
<p>Retail : Coffee Beans, Home Brewing Equipments,
Sippers, Tumblers</p>
</div>

</div>
</asp:Content>

TYBCA 558 [ASP.NET] 15


RESTAURENT MANGEMENT SYSTEM

ABOUT PAGE

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="about.aspx.vb"
Inherits="website.about" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
body {
font-family: Arial, sans-serif;
}
.head h2 {
font-size: 35px;
font-family: 'Oswald', sans-serif;
line-height: 1.2;
font-weight: 700;
padding-top: 35px;
}

hr {
margin: 0;
border-top: 3px solid #ab8b65;
width: 111.594px;
}

TYBCA 558 [ASP.NET] 16


RESTAURENT MANGEMENT SYSTEM

.p1 p,
.p2 p {
line-height: 24px;
color: #7e7e7e;
font-size:18px;
}

.p2 h3 {
font-family: 'Oswald', sans-serif;
font-weight: 400;
font-size: 25px;
line-height: 32px;
color: #212529;
margin: 0px 0px 20px 0px;
}

#fp a {
margin: 0px 15px 0px 15px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<div class="main" style="padding-left: 100px; padding-right: 100px">
<div class="head">
<h2>About Us</h2>
<hr>
</div>
<div class="p1">
<p>Awarded as Emerging Cafe Chain Of The Year by Franchise
India, Food Castle– The Ristorante Lounge is a thriving success with over
21 outlets across the country. Today, FC has become a hot spot for today’s
youth with our innovative ideas and conceptual spaces, each outlet
reflecting distinctive personalities and vibes to amalgamate with people
of the area, becoming close to the heart of every millennial.</p>
<p>Our mantra, “Unculture Yourself”, a message we unravel with
every new revolution and concept. We dare to help our customers encounter
a new experience, every time they visit us.</p>
<p>We began our journey in 2004 with the launch of our first
flagship store in New York City, America. Since then we are growing
exponentially year by year and by the end of 2021, we plan to launch a
total of 100 outlets across the country.</p>
</div>
<div class="p2">
<h3>OUR SPACES</h3>
<p>We are focused on giving a satisfactory user experience and
creating spaces which connect with the local culture of any location we
establish at. As a brand, we deeply understand and value the connect our
customers need to feel and thus, each of our cafes are community spaces,
socializing spots that are inspired by the localism of the area.</p>

<h3>THE MENU</h3>

TYBCA 558 [ASP.NET] 17


RESTAURENT MANGEMENT SYSTEM

<p>Fresh & superior quality ingredients are used to create


innovative dishes and beverages that taste & look distinctive and incite
fascination. The coffees are famous, but CC is equally known for its vast
range of food items & their presentations. From serving the burgers in a
treasure box to sizzlers in a wooden ship, from fishbowl martinis to the
introduction of unique Insta Specials, we have always pushed the limits in
everything we do unculturing ourselves and ones who visit us.</p>

<h3>THE AMBIENCE</h3>
<p>We are constantly focused on creating a space that every
customer feels welcome to. With each outlet, we ensure to design an
ambiance that not only resonates with the people of that area, it also
makes the branch one of a kind. From the lighting to the curated music,
from free-walk spaces to the seating, we formulate an aesthetic as a whole
so the final picture at the end is nothing short of marvelous!</p>
</div>
</div>
</div>
</asp:Content>

TYBCA 558 [ASP.NET] 18


RESTAURENT MANGEMENT SYSTEM

CONTACT PAGE

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="contact.aspx.vb"
Inherits="website.contact" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style type="text/css">
body {
font-family: Arial, sans-serif;
}

.contact-section {
padding: 60px;
background-color: #f5f5f5;
display: flex;
justify-content: space-between;
align-items: flex-start;
text-align: left;
}

.contact-info, .contact-form {
flex: 1;
padding: 20px;
}

.contact-info {
margin-right: 20px;
}

.contact-section h1 {
font-size: 2.5rem;
margin-bottom: 20px;

TYBCA 558 [ASP.NET] 19


RESTAURENT MANGEMENT SYSTEM

.contact-section p {
font-size: 1.1rem;
line-height: 1.6;
margin-bottom: 40px;
}

.contact-info div {
margin-bottom: 20px;
font-size: 1.1rem;
}

.contact-info i {
font-size: 1.5rem;
margin-right: 10px;
color: #d16527;
}

.contact-form label {
font-size: 1rem;
display: block;
margin-bottom: 8px;
}

.contact-form input, .contact-form textarea {


width: 100%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1rem;
}

.contact-form input[type="submit"] {
border-style: none;
border-color: inherit;
border-width: medium;
background-color: #212529;
color: #fff;
cursor: pointer;
font-size:20px;
}

.map-section {
padding: 60px;
background-color: #fff;
text-align: center;
}

.map-section iframe {
width: 100%;
height: 400px;

TYBCA 558 [ASP.NET] 20


RESTAURENT MANGEMENT SYSTEM

border: none;
}
</style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


runat="server">
<!-- Contact Section -->
<div class="contact-section">
<!-- Contact Information -->
<div class="contact-info">
<h1>Contact Us</h1>
<p>We'd love to hear from you! Whether you have a question
about our menu, reservations, or anything else, our team is ready to
answer all your questions.</p>
<div><i class="fa fa-map-marker"></i>123 Main Street, Anytown,
USA</div>
<div><i class="fa fa-phone"></i>(123) 456-7890</div>
<div><i class="fa fa-envelope"></i>[email protected]</div>
</div>

<!-- Contact Form -->


<div class="contact-form">
<asp:Label ID="lblName" runat="server"
Text="Name:"></asp:Label>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>

<asp:Label ID="lblEmail" runat="server"


Text="Email:"></asp:Label>
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>

<asp:Label ID="lblMessage" runat="server"


Text="Message:"></asp:Label>
<asp:TextBox ID="txtMessage" runat="server"
TextMode="MultiLine" Rows="5"></asp:TextBox>

<asp:Button ID="btnSubmit" runat="server" Text="Send Message"


/>
</div>
</div>

</asp:Content>

TYBCA 558 [ASP.NET] 21


RESTAURENT MANGEMENT SYSTEM

LOGIN PAGE

PAGE CODE :-

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="login.aspx.vb"
Inherits="website.Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style type="text/css">
/* General Styles */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
}

/* Title Styling */
.login-title {
text-align: center;
color: #333;
font-size: 40px;
margin-bottom: 20px;
}

/* Table Styling */
.login-table {
background-color: #fff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
height: 271px;
width: 464px;

TYBCA 558 [ASP.NET] 22


RESTAURENT MANGEMENT SYSTEM

/* Table Cell Styling */


.label-cell {
padding-right: 10px;
color: #555;
font-weight: bold;
}

.input-cell {
padding-bottom: 15px;
}

/* Input Styling */
.input-textbox {
width: 100%;
padding: 8px;
font-size: 1em;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}

/* Button Styling */
.login-button {
background-color: #212529;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
margin-right: 20px;
transition: background-color 0.3s ease;
}

.login-button:hover {
color: rgb(171, 139, 101);
}

/* Hyperlink Styling */
.register-link {
color: #212529;
text-decoration: none;
font-size: 0.9em;
}

/* Button Cell Alignment */


.button-cell {
text-align: right;
}
</style>
</asp:Content>

TYBCA 558 [ASP.NET] 23


RESTAURENT MANGEMENT SYSTEM

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"


runat="server">
<p>&nbsp;</p>

<table class="login-table" align="center">


<h1 class="login-title">LOGIN</h1>
<tr>
<td class="label-cell">USERNAME:</td>
<td class="input-cell">
<asp:RequiredFieldValidator ID="rfvUsername"
runat="server" ControlToValidate="uname" ErrorMessage="Username is
required" ForeColor="Red" Display="Dynamic" />
<asp:TextBox ID="uname" runat="server" CssClass="input-
textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="label-cell">PASSWORD:</td>
<td class="input-cell">
<asp:RequiredFieldValidator ID="rfvPassword"
runat="server" ControlToValidate="pass" ErrorMessage="Password is
required" ForeColor="Red" Display="Dynamic" />
<asp:TextBox ID="pass" runat="server" CssClass="input-
textbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td class="button-cell"></td>
<td class="button-cell">
<asp:Button ID="btnlogin" runat="server" CssClass="login-
button" Text="LOGIN" />
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/registration.aspx" CssClass="register-link">Create An
Account</asp:HyperLink>
</td>
</tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
<br />
</asp:Content>

VB FILE :-

Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Public Class Login
Inherits System.Web.UI.Page

TYBCA 558 [ASP.NET] 24


RESTAURENT MANGEMENT SYSTEM

Dim con As New


SqlConnection(WebConfigurationManager.ConnectionStrings("conn").ToString)
Dim cmd As New SqlCommand
Dim dr As SqlDataReader

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
Try
cmd.Connection = con
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

Protected Sub btnlogin_Click(sender As Object, e As EventArgs) Handles


btnlogin.Click
Try
cmd.CommandText = "select *from registration where username =
'" & uname.Text & "' and password = '" & pass.Text & "'"
con.Open()
dr = cmd.ExecuteReader
If dr.HasRows Then

Session("username") = uname.Text
Response.Redirect("additem.aspx", False)
Else
MsgBox("Invalid username or password")
End If
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class

TYBCA 558 [ASP.NET] 25


RESTAURENT MANGEMENT SYSTEM

REGISTRATION PAGE

PAGE CODE :-

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="registration.aspx.vb"
Inherits="website.registration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style type="text/css">
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
}
.login-title {
text-align: center;
color: #333;
font-size: 1.8em;
margin-bottom: 15px;
}
.login-table {
background-color: #fff;
padding: 15px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.label-cell {
padding-right: 10px;
color: #555;
font-weight: bold;
}

TYBCA 558 [ASP.NET] 26


RESTAURENT MANGEMENT SYSTEM

.input-cell {
padding-bottom: 14px;
}
.input-textbox {
width: 100%;
padding: 8px;
font-size: 1em;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
.login-button {
background-color: #212529;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
margin-right: 20px;
transition: background-color 0.3s ease;
}

.login-button:hover {
color: rgb(171, 139, 101);
}

.register-link {
color: #212529;
text-decoration: none;
font-size: 0.9em;
}

.button-cell {
text-align: right;
}
.auto-style1 {
height: 22px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<h1 class="login-title">REGISTRATION</h1>
<table class="login-table" align="center">
<tr>
<td>&nbsp;</td>
<td>
<asp:RequiredFieldValidator ID="rfvUsername"
runat="server" ControlToValidate="txtUsername" ErrorMessage="Username is
required" ForeColor="Red" CssClass="error-message" SetFocusOnError="True"
Display="Dynamic" />

TYBCA 558 [ASP.NET] 27


RESTAURENT MANGEMENT SYSTEM

</td>
</tr>
<tr>
<td class="label-cell">USERNAME :</td>
<td class="input-cell">
<asp:TextBox ID="txtUsername" runat="server"
CssClass="input-textbox"></asp:TextBox>

</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:RequiredFieldValidator ID="rfvEmail" runat="server"
ControlToValidate="txtEmail" ErrorMessage="Email is required"
ForeColor="Red" CssClass="error-message" SetFocusOnError="True"
Display="Dynamic" />
<asp:RegularExpressionValidator ID="revEmail"
runat="server" ControlToValidate="txtEmail" ErrorMessage="Invalid email
format" ValidationExpression="\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}"
ForeColor="Red" CssClass="error-message" SetFocusOnError="True"
Display="Dynamic" />
</td>
</tr>
<tr>
<td class="label-cell">EMAIL :</td>
<td class="input-cell">
<asp:TextBox ID="txtEmail" runat="server" CssClass="input-
textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style1"></td>
<td class="auto-style1">
<asp:RequiredFieldValidator ID="rfvPassword"
runat="server" ControlToValidate="txtPassword" ErrorMessage="Password is
required" ForeColor="Red" CssClass="error-message" SetFocusOnError="True"
Display="Dynamic" />
</td>
</tr>
<tr>
<td class="label-cell">PASSWORD :</td>
<td class="input-cell">
<asp:TextBox ID="txtPassword" runat="server"
CssClass="input-textbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:RequiredFieldValidator ID="rfvConfirmPassword"
runat="server" ControlToValidate="txtConfirmPassword"

TYBCA 558 [ASP.NET] 28


RESTAURENT MANGEMENT SYSTEM

ErrorMessage="Confirm Password is required" ForeColor="Red"


CssClass="error-message" Display="Dynamic" />
<asp:CompareValidator ID="cvPassword" runat="server"
ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword"
ErrorMessage="Passwords do not match" ForeColor="Red" CssClass="error-
message" Display="Dynamic" />
</td>
</tr>
<tr>
<td class="label-cell">CONFIRM PASSWORD :</td>
<td class="input-cell">
<asp:TextBox ID="txtConfirmPassword" runat="server"
CssClass="input-textbox" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td class="button-cell"></td>
<td class="button-cell">
<asp:Button ID="btnRegister" runat="server"
CssClass="login-button" Text="REGISTER" />
<asp:HyperLink ID="lnkLogin" runat="server"
NavigateUrl="~/login.aspx" CssClass="register-link">Already have an
account? Login</asp:HyperLink>
</td>
</tr>

</table>
</asp:Content>

VB FILE :-

Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Public Class registration
Inherits System.Web.UI.Page
Dim con As New
SqlConnection(WebConfigurationManager.ConnectionStrings("conn").ToString)
Dim cmd As New SqlCommand
Dim dt As DataTable
Dim da As SqlDataAdapter

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
Try
cmd.Connection = con
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

TYBCA 558 [ASP.NET] 29


RESTAURENT MANGEMENT SYSTEM

Protected Sub btnRegister_Click(sender As Object, e As EventArgs)


Handles btnRegister.Click
Try
cmd.Connection = con
cmd.CommandText = "insert into registration values('" &
txtUsername.Text & "','" & txtEmail.Text & "','" & txtPassword.Text & "')"
con.Open()
cmd.ExecuteNonQuery()
MsgBox("Registration Successfull")
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class

TYBCA 558 [ASP.NET] 30


RESTAURENT MANGEMENT SYSTEM

ADD ITEM PAGE

PAGE CODE :-

<%@ Page Title="" Language="vb" AutoEventWireup="false"


MasterPageFile="~/Site1.Master" CodeBehind="additem.aspx.vb"
Inherits="website.additem" %>

TYBCA 558 [ASP.NET] 31


RESTAURENT MANGEMENT SYSTEM

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
body {
font-family: Arial, sans-serif;
}

.additems {
width: 100%;
}

.food-form {
width: 550px;
margin: 35px auto;
background-color: #f9f9f9;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.food-form input, .food-form textarea {


width: 94%;
padding: 15px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size:16px;
}

.food-form .btn {
background-color: #212529;
width: 100%;
color: white;
padding: 15px;
font-size:20px;
border: none;
border-radius: 5px;
cursor: pointer;
}

.food-form .btn:hover {
color: rgb(171, 139, 101);
}

.gridview-container {
width: 80%;
margin: 20px auto;
}

.gridview-container .gridview {
width: 100%;
border-collapse: collapse;
}

TYBCA 558 [ASP.NET] 32


RESTAURENT MANGEMENT SYSTEM

.gridview-container .gridview th, .gridview-container .gridview td


{
padding: 10px;
border: 1px solid #ddd;
text-align: left;
}

.gridview-container .gridview th {
background-color: #212529;
color: white;
}

</style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
<div class="additems">
<div class="food-form">
<h2>Add Food Item</h2>
<asp:TextBox ID="txtFoodName" runat="server" Placeholder="Food
Item Name"></asp:TextBox>
<asp:TextBox ID="txtDescription" runat="server"
TextMode="MultiLine" Rows="4" Placeholder="Description"></asp:TextBox>
<asp:TextBox ID="txtPrice" runat="server"
Placeholder="Price"></asp:TextBox>
<asp:FileUpload ID="fuImage" runat="server" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
class="btn" />
</div>

<div class="gridview-container">
<asp:GridView ID="GridView1" runat="server"
CssClass="gridview" AutoGenerateDeleteButton="True"
AutoGenerateEditButton="True" DataKeyNames="FoodID"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="FoodID" HeaderText="Food
Item ID" ReadOnly/>
<asp:BoundField DataField="FoodName" HeaderText="Food
Item Name" />
<asp:BoundField DataField="Description"
HeaderText="Description" />
<asp:BoundField DataField="Price" HeaderText="Price"
/>
<asp:ImageField DataImageUrlField="ImagePath"
HeaderText="Image">
<ControlStyle Width="250px" Height="150px" />
</asp:ImageField>
</Columns>
</asp:GridView>
</div>

TYBCA 558 [ASP.NET] 33


RESTAURENT MANGEMENT SYSTEM

</div>

</asp:Content>

VB FILE :-

Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports System.Web.Configuration
Public Class additem
Inherits System.Web.UI.Page
Dim con As New
SqlConnection(WebConfigurationManager.ConnectionStrings("conn").ToString)
Dim cmd As New SqlCommand

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load
If Not IsPostBack Then
LoadGridView()
End If
If Session("username") = "" Then
MsgBox("Sorry..!! Please Login First")
Response.Redirect("~/login.aspx", False)
End If
End Sub

Protected Sub btnSubmit_Click(sender As Object, e As EventArgs)


Handles btnSubmit.Click
Try
' Save the uploaded image
Dim filePath As String = "~/Images/" &
Path.GetFileName(fuImage.PostedFile.FileName)
fuImage.SaveAs(Server.MapPath(filePath))

' Directly build the SQL query string


Dim sqlQuery As String = "INSERT INTO FoodItems (FoodName,
Description, Price, ImagePath) VALUES ('" & txtFoodName.Text & "', '" &
txtDescription.Text & "', '" & Convert.ToDecimal(txtPrice.Text) & "', '" &
filePath & "')"

' Execute the SQL query


cmd.Connection = con
cmd.CommandText = sqlQuery
con.Open()
cmd.ExecuteNonQuery()
con.Close()

' Refresh GridView


LoadGridView()
Catch ex As Exception
' Handle exceptions

TYBCA 558 [ASP.NET] 34


RESTAURENT MANGEMENT SYSTEM

End Try
End Sub

Private Sub LoadGridView()


Try
cmd.Connection = con
cmd.CommandText = "SELECT * FROM FoodItems"
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
da.Fill(dt)
GridView1.DataSource = dt
GridView1.DataBind()
Catch ex As Exception
' Handle exceptions
End Try
End Sub

Private Sub GridView1_RowCancelingEdit(sender As Object, e As


GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit
GridView1.EditIndex = -1
LoadGridView()
End Sub

Private Sub GridView1_RowEditing(sender As Object, e As


GridViewEditEventArgs) Handles GridView1.RowEditing
GridView1.EditIndex = e.NewEditIndex
LoadGridView()
End Sub

Private Sub GridView1_RowUpdating(sender As Object, e As


GridViewUpdateEventArgs) Handles GridView1.RowUpdating
Try

Dim FoodID As String = GridView1.DataKeys(e.RowIndex).Value()

Dim FoodName, Description, Price, ImagePath As New TextBox


FoodName = GridView1.Rows(e.RowIndex).Cells(2).Controls(0)
Description = GridView1.Rows(e.RowIndex).Cells(3).Controls(0)
Price = GridView1.Rows(e.RowIndex).Cells(4).Controls(0)
ImagePath = GridView1.Rows(e.RowIndex).Cells(5).Controls(0)
cmd.Connection = con
cmd.CommandText = "Update FoodItems set FoodName = '" &
FoodName.Text & "',Description = '" & Description.Text & "',Price = '" &
Price.Text & "', ImagePath = '" & ImagePath.Text & "' where FoodID = '" &
FoodID & "' "
con.Open()
cmd.ExecuteNonQuery()
con.Close()
GridView1.EditIndex = -1
LoadGridView()
Catch ex As Exception
MsgBox(ex.Message)

TYBCA 558 [ASP.NET] 35


RESTAURENT MANGEMENT SYSTEM

End Try
End Sub

Protected Sub GridView1_RowDeleting(sender As Object, e As


GridViewDeleteEventArgs) Handles GridView1.RowDeleting
Try
Dim FoodID As String = GridView1.DataKeys(e.RowIndex).Value()
MsgBox(FoodID)
' Execute the SQL query
cmd.Connection = con
cmd.CommandText = "delete from FoodItems where FoodID = '" &
FoodID & "'"
con.Open()
cmd.ExecuteNonQuery()
con.Close()
' Refresh GridView
LoadGridView()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class

TYBCA 558 [ASP.NET] 36


RESTAURENT MANGEMENT SYSTEM

WEB CONFIG FILE


<?xml version="1.0"?>

<!--
For more information on how to configure your ASP.NET application,
please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode"
value="None"></add>
</appSettings>
<system.web>
<compilation debug="true" strict="false" explicit="true"
targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<connectionStrings>
<add name="conn" connectionString="Data
Source=(LocalDB)\v11.0;AttachDbFilename=D:\ADO.NET\01FIRSTPROGARM\website\
website\App_Data\Database1.mdf;Integrated Security=True" />
<add name="ConnectionString" connectionString="Data
Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Inte
grated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>

TYBCA 558 [ASP.NET] 37

You might also like