Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 264

MCSP -60

060
Online Paper Work (OPW)
by

MANISH KUMAR GOND


Enrolment No: 176430487

Under Guidance of
Mr. Vikas Sharma

Submitted to the School of Computer and Information Sciences,


IGNOU
in partial fulfilment of the requirements
for the award of the degree
Master of Computer Applications (MCA)
June 2020

Indira Gandhi National Open University


N araina Vihar
New Delhi – 110028.
INDEX
S.NO. TOPIC PAGE.No.
1. Approval Letter 3

2. Certificate of originality 4

3. Guide Resume 5

1. Title Of The Project 8


2. Project Synopsis 9
3. Project Report 41
3.1 Introduction And Objective 42
3.1.1 Introduction 42
3.1.2 Objective 43
3.2 System Analysis 44
3.2.1 Identification of Need (Problem Definition) 44
3.2.2 Preliminary Investigation 45
3.2.3 Feasiility Study 46
3.2.4 Project Planning 47
3.2.5 Project Category 48
3.2.6 Tools/Plateform (Software/Hardware) 49
3.2.7 Project Scheduling 50
- Pert Chart 50
- Gantt Chart 51
3.2.8 Software Requirement Specification (SRS) 52
3.2.9 Software Engineering Paradigm (SDLC Model) 59
3.2.10 Data Model 61
- Data Flow Diagram (DFD) 61
- Entity Relationship Diagram (ERD) 66
- Use Case Diagram 67
3.3 System Design 68
3.3.1 Modularisation Details 68
3.3.2 Process Login of Modules 71
3.3.3 Data Integrity and Constraints 74
3.3.4 Database Design 75
3.3.5 User Interface Design 84
3.4 Coding 105
3.4.1 Sql Commands 105
3.4.2 Project Coding including (comments & description, standardization,
error handling, parameters calling/passing and validation checks) 109
3.5 Testing 240
3.5.1 Testing Techniques and Testing Strategies Used 240
3.5.2 Test Cases 241
3.6 Security Mechanisms 249
3.6.1 Database/Data Security 249
3.6.2 Profile and Access Rights 250
3.7 Cost Estimation of the Project along with Cost Estimation Model 252
3.8 Report Generation 253
3.9 Future Scope 260
3.10 Limitation of the project 261
3.11 Bibliography 262
1
2
3
T-783 A3 Baljeet Nagar
Street No. 8 New Delhi 110008
+919953625563
vvikassharmaa@hotmail.com,
vvikassharmaa@gmail.com

OBJECTIVES Intend to build a career with reputed company with committed & dedicated people, which will help
me to explore myself fully and realize my potential. Willing to work in an environment where
knowledge is appreciated.

Infotech Soft-Net Compter Education:- Jan 2015 to till date

Profile: - Academic Head

Role: - Preparing the students for BCA and MCA examination along with DOEACC ‘O’ and ‘A’
Level certified courses.

Proficiency: - ‘C’, ‘C++’, C# asp.net, VB.net, .NET, SQL Server Data structure through ‘C’ and ‘C+
+’, HTML, CSS, JavaScript, Linux, Operating System, Software Engineering, DBMS, Data
Communication and Networking etc.

EXPERIENCE Linkers India: - August 2005 to December 2014


(Authorized study Centre of Punjab Technical University and DOEACC
Certified Courses)

Profile: - Academic Head

Role: - Preparing the students for BCA and MCA examination along with DOEACC ‘O’ and ‘A’
Level. I also design the course layout of the various courses for the Organization.

Proficiency: - ‘C’, ‘C++’, C# asp.net, VB.net, .NET, SQL Server Data structure through ‘C’ and ‘C+
+’, HTML, CSS, JavaScript, Linux, Operating System, Software Engineering, DBMS, Data
Communication and Networking etc.

Vedanta: - April 2005 to July 2005

Role: - Joined the organization as a senior faculty. Handle the batches for DOEACC ‘O’ and ‘A’
Level.

Smart Computer Education: - August 2003 to December 2004

Role: - Handling of short term courses and preparing the students for BCA examination.
3 Pursuing ‘C’ Level from NIELIT.
4 MCA from Punjab Technical University in First Division.
EDUCATION 5 M.SC(IT) from Punjab Technical University in First Division
6 Qualified ‘A’ Level from NIELIT (DOEACC Society).
7 Qualified ‘O’ Level from NIELIT (DOEACC Society).
8 Completed Higher Diploma in Software Engineering (HDSE) from DICS (Delhi Institute for
Computer Science)

4
1. Languages: ‘C’, ‘C++’, C# asp.net, VB.net, .NET, SQL Server Data structure through ‘C’
SKILLS and ‘C++’

2. Packages: Visual FoxPro, SQL Sever 2008 MS-Access, Tally

3. Operating Systems: MS-Dos, Windows9X, Unix, Linux

Project 1
www.shriinstitute.com
Description
An Computer institute web portal offers wide variety of career, professional short term, certificate
course provided by institute. Email sents to enquiry, enrolling, contact, register for placements,
register for companies to both the clients and institute and online examination for students who
enrolled in institute. Admin Panel for institute for daily updating, deletion, insertion of exam papers.
Maintaining database, result, enquiries, enrolling students, register for students, register for
companies.
Front End:- ASP.Net, C#
Back End:- SQL Server

Project 2
Windows payroll application
ACADEMI Description
CPROJEC The project was to create the software of an payroll management system. The software worked on
TS the module of the payroll that included add new record, Delete record, search and print record,
update record and calculate HRA, DA, TA and other allowances to make process easy.
Front End:- .NET
Back End:- MS-Access

Project 3
Payroll management System
Language of implementation: - Visual FoxPro 6.0
Operating System: - Windows95/98/XP
Description
This utility helps in maintaining the leave records of the organization. Beside
this it provide the utility of issuing and calculating the salaries of various
employees working in the organization.
Project 4
Computerized Purchase System
Language of implementation: - C++ (Turboc3)
Operating System: -Windows 95/98/XP
Description
The main idea behind the implementation of this project is to
computerized purchase section of the organization. The complete
project handles purchases made by the organization.

ACADEMIC 1. 2005: BCOM (Pass) Graduate from Delhi University


QUALIFICATION
2. 1999-2000: 12th Passed from CBSE Board Delhi

3. 1997-1998: 10th Passed from CBSE Board Delhi

AREA OF Making new friends, listening Music, Net surfing, watching Cricket & Singing
INTERESTS

PERSONA 12. Father’s Name : L/O Mr. Jai Gopal Sharma


LDETAILS 13. Date of Birth : 25th-Aug-1982.

5
 Gender : Male
 Nationality : Indian
 Languages : English, Hindi
 Typing Speed : 40 W.P.M

I hereby declare that all the information mentioned above is true to the best of my knowledge.

Date: -26/12/2021
Place: - New Delhi VIKAS SHARMA

1
1. TITLE OF THE PROJECT

ONLINE
PAPER
WORK
(OPW)

1
2. PROJECT SYNOPSIS

2
2.1. INTRODUCTION AND OBJECTIVE OF THE PROJECT

2.1.1. Introduction:-

Online Paper Work (OPW) is an online service, it will use to computerize


the booking process of orders for printing of paper products. Products like visiting
cards, Posters, Magazines, Letter head, Envelopes, Books, Diaries, Calendars,
Bill books etc. Unlike visiting many printing presses and spending lots of time
to book order for printing, customer can book order online easily.

Online Paper Work (OPW) provide an online platform to book orders where
customer can search product design from the categories and can select the size,
dimension, quantity, paper quality as per the requirements. Customer can also
upload their own design, layout of the document. The project has been
developed to override the problems of manual system. It reduced the no. of
error rate and help in easily maintaining records.

Customer can select page design layout for books, text books, diaries,
Magazines etc. and customer can select many different payment option for
payment. Customer can check booked order and payment reports. In addition
customer need to provide their id prove in some requirement like printing of
letter head etc. (if customer is government employee).

Once the order is placed, printing job can be started according to customer
specification and details. After printing job is done the product can be deliver to
customer registered address or customer can pick its own from printing press
office.

3
2.1.2. Objective:-

The main objective of Online Paper Work (OPW) is to automate the existing
system so that the user can book printing order online easily. Using this system
data can be stored for long period with less error rate. It reduce the paper work
and help user to easily get service from long distance.

Online Paper Work (OPW) provide the services to customer in an easy way.
Customer can save time by searching and selecting of product and many available
design in few minutes and can save money by comparing one product with
other.

The printing order can be book from anywhere, any time by spending less amount
of time. Customer not need to go any printing press office and placing order
manually, by using Online Paper Work (OPW) customer can book order from
their home, office or anywhere.

Online Paper Work (OPW) is easy to use and user friendly. Any customer
with basic knowledge of computer and internet can use this website. It is fast
and also better way for placing online orders for printing.

The main objective of this project as follows:

1. Providing a web based system to overcome shortfalls of manual system.

2. Providing various information of products.

3. With the help of this project, making data accessing fast.

4
4. Reducing the data error and mistakes.

5
2.2. PROJECT CATEGORY

ONLINE PAPER WORK (OPW) comes under category of web


based application and RDBMS.

User interact with the website as the front end of the system. The
Data of the system is stored in back end of RDBMS database. The
database help to store and retrieve the data in efficient manner.

The front end of the system will be ASP.NET with C# and SQL
server as the back end. ASP.NET and SQL server both are Microsoft
company software and will be easy connect them. For developing a
web based application asp.net with c# is one of the best combination.
It provide many data library, built in function, concept of oops
(Object Oriented Programming) and easy way to connect with any
database.

SQL server is one of the best database for storing data. It is falls under
RDBMS. Here all data is stored in a relational manner that help to
retrieve and update. It help to maintain the data integrity, consistency,
availability and avoid unauthorized access.

6
2.3. TOOLS/PLATFORM

Software:

Platform : Window

Operating System : Window 7 and up

Tools : Microsoft Visual Studio

Front End : Asp.net with c#

Back End : SQL server 2012

Hardware

Process : Intel Pentium –IV and up

Main Memory : 1 GB and up

Network Adaptor : Ethernet Adaptor

Hard Disk : 500 GB and up

7
2.4. PROBLEM DEFINITION

The present manual process of booking order for printing of a


paper product was very time consuming and costly.

First of all, the customer need to search for nearest printing press then
need to spend money and time to visit there office for booking of
order.

After searching and finding the best design of product, customer


gives the design specification and details of printing. Finally customer
pay the amount of printing.

In the whole process customer spend lots of his/her valuable time and
money. Also many time customer can’t find a good looking design so
customer randomly selects a design due to don’t have much time to
check every single design.
Hence customer have to compromise with given designs and quality.

On the other hand in printing press’s office due to all the paper work
done by hand manually, so it increase the risk of error and
redundancy. Also some time it become hard to find a particular
recode and related details.

8
2.5. SCOPE OF THE SOLUTION

The main scope of the project is to convert the manual system into
computerized system. It will make fast & easy the process of booking
order for printing and reduce the paper work and error rates. It will
help the organization as well as customer who wants to use the
service.

Anyone can use the web site of the given organization from
anywhere any time and as much time he/she want. It will be fast and
easy by online booking instead of visiting the printing press’s office
and meeting face to face for booking order.

In the web site customer can use different types of modules for
‘searching and selecting of product design, also can upload their own
design if not happy with given designs. Customer can select design
specification and paper quality.

Various payment option will be available for make payment with


home delivery feature if needed. Once the order is place customer can
check and track the current and previous booked orders details,
payment details etc. Also customer can give feedback.

9
2.6. PROJECT PLANNING AND SCHEDULING

Pert (Program Evaluation & Review Technique) Chart

Analysis of the existing SystemSelection & learning the s/w to be used


Day 1 – 18 Problem Day 19 – 29 Day 30 – 73
START18 DaysAnalysis 10 Days 43 Days

14 Days
Day 74 – 88

Understanding Database

60 Days
Day 89 – 144

Coding

10 Days
Day 145 –155

Page Designing

2 Days 5 Days 10 Days


Implementation Evaluation Testing

173 -175 Days 167 – 172 Days 156 – 166 Days

1
2.7. ANALYSIS

DATA FLOW DIAGRAM (DFD’S)

‘0’ Level DFD

Customer
Management Customer Details
Category
Management Category Details
Product
Management Product Details
Design Management Online
Design Details
Paper Work
Order Management (OPW) Order Details

Bills Management Bills Details

Payment Management Payment Details

Administrator Management Administrator Details

1
‘1’ Level DFD

Customer

Online
Paper
Gues
Work
(OPW)

Sign Up
Customer Customer Details

Forget
Password

Login

Search Searc
Categor h
Manage
Modules Manag
My Design
e

My Order Payment

Give
Feedbac Bills
Report
1
‘1’ Level DFD

Administrator

Online
Paper
Work (OPW)

Administrator Administrator Details


Login

Manage Product Manage Category


Manage
Modules
Manage Customer Orders Generate Reports

Manage Customer Details Check Payment Details

Check Feedback

1
‘2’ Level DFD
Customer

OPW

Customer Customer Details


Register

Login

Product Details
Product/Category Search
Category Details

Book
Product Order Details

Design Upload Design Details

Pay Payment Details


Bills

Report Bills Details


Check

Exit

13
‘2’ Level DFD
Administrator

OPW

Login
Administrator Administrator Details

Add / Product Details


Product/Category Update /
Delete Category Details

Customer Order Check Order Details

Give
Approve/Disapprove Acknowledge Order Details

Payment
Received Payment Details

Report Bills Details


Generate

1
Exit

1
Order_Id
User_Id
Login_Id E-R DIAGRAM Quantity
Password Product_Id
User_Id Amount
Email_Id
Paper_Quality
1
Customer Boo Print Job Order
k M
Phone_No Order_Id
1 d M M
1
1
Payment_Type
Name Address Payment_Id Size
Amount
Make Payment
1
Feedback_Type
User_Id M
Give
M
Feedback
Document_Type
Feedback_Id M Message
1
ID_No
Check ID Proof
Image M
User_Id
Image Receive
M

Category Perform
M
Image Manage
Category_Id
Name
M Name Name Staff_Id
M 1 1 M
Product 1 M
Description Administrator Have Staff
Product_Id
Price Admin_Id 1 1 Name

Page_Design Email_Id
Quantity Designation

Receive Contact Salary


Category_Id
Password
Material_Id Login_Id Name Supplier_Id
M M
M 1
Name
Raw Material Provide Supplier
Quantity Phone_No Shop_Address
Supplier_Id

1
USE CASE DAIGRAM

Registration

Search Category

Search Product

Manage Profile

Upload Design

Book Order

Login

Make Payment
CUSTOMER

Check Payment Bills

Feedback

Manage Category
ADMINISTRATOR
Manage Product

Manage Orders

Check Customer Details

Check Payment Details

1
Report Generation

1
2.8. SOFTWARE DEVELOPMENT LIFE CYCLE MODEL
(SDLC)

The Software Development Lifecycle (SDLC) is a systematic process for


building software that ensures the quality and correctness of the software built.
SDLC process aims to produce high-quality software which meets customer
expectations. The system development should be complete in the pre-defined
time and cost. There are many type of model available some are given below.

TYPES OF SOFTWARE MODELS:-

1. Waterfall model
2. RAD model
3. Iterative enhancement model
4. Spiral model

Online Paper Work (OPW) is a short project and waterfall model is well
suited. The Waterfall Model was the first model to be introduced. It is also
referred to as a linear-sequential life cycle model.

It is very simple to understand and use. In a waterfall model, each phase


must be completed before the next phase can begin and there is no overlapping
in the phases.

When to use the waterfall model:

 Requirements are very well known, clear and fixed.


 Product definition is stable.
 The project is short.
 There are no ambiguous requirements

1
Advantages of waterfall model:

 Simple and easy to understand and use.


 Easy to manage due to the rigidity of the model.
 Each phase has specific deliverables and a review process.
 Phases are processed and completed one at a time.

Disadvantages of waterfall model:

 High amounts of risk and uncertainty.


 Not a good model for complex and object-oriented projects.
 Not suitable for the projects where requirements are at a moderate
to high risk of changing.
 Once an application is in the testing stage, it is very difficult to go
back and change something that was not well-thought out in the concept
stage.

2
2.9. DATABASE DESIGN

1. Customer

Fields Data Type Description Key Constraint


User Id Numeric(10) Customer Identification No. Primary Key
Login Id Varchar(50) Customer Login Id Unique, Not null
Password Varchar(50) Customer Login Password Not null
Name Varchar(30) Customer Name Not null
Address Varchar(150) Customer Address Not null
Phone_no Numeric(10) Customer Phone No. Unique, Not null
Email_id Varchar(50) Customer Email Unique, Not null

2. Administrator

Fields Data Type Description Key Constraint


Admin_Id Numeric(10) Administrator Identification No. Primary Key
Login_id Varchar(50) Administrator Login Id Unique, Not null
Password Varchar(50) Administrator Password Not null
Name Varchar(30) Administrator Name Not null
Email_Id Varchar(50) Administrator Email Unique, Not null

3. Category

Fields Data Type Description Key


Constraint
Category_Id Numeric(10) Category Identification No. Primary Key
Name Varchar(30) Category Name Not null
Image Varchar(MAX) Category Image Address Not null

2
4. Product

Fields Data Type Description Key


Constraint
Product_Id Numeric(10) Product Identification No. Primary Key
Name Varchar(30) Product Name Not null
Price Numeric(10) Product Price Not null
Quantity Numeric(10) Product Quantity Not null
Description Varchar(MAX) Product Description Not null
Page Design Bit Product Page Design Not null
Image Varchar(MAX) Product Image Address Not null
Category_Id Numeric(10) Category Identification No. Foreign Key

5. Print Job Order

Fields Data Type Description Key Constraint


Order_Id Numeric(10) Order Identification No. Primary Key
Product_Id Numeric(10) Product Identification No. Foreign Key
User_Id Numeric(10) Customer Identification No. Foreign Key
Size Varchar(30) Order Size Not null
Quantity Numeric(10) Order Quantity Not null
Paper_Quality Varchar(30) Order Paper Quality Not null
Amount Numeric(10) Order Amount Not null

6. ID Proof

Fields Data Type Description Key Constraint


Id_No Numeric(10) Identity Proof No. Primary Key
User_Id Numeric(10) Customer Identification No. Foreign Key
Document_Type Varchar(30) Identity Document Type Not null
Image Varchar(MAX) Identity Image Address Not null

2
7. Payment

Fields Data Type Description Key Constraint


Payment_Id Numeric(10) Payment Identification No. Primary Key
Order_Id Numeric(10) Order Identification No. Foreign Key
Payment_Type Varchar(30) Payment Type Not null
Amount Numeric(10) Payment Amount Not null

8. Supplier

Fields Data Type Description Key Constraint


Supplier_Id Numeric(10) Supplier Identification No. Primary Key
Name Varchar(50) Supplier Name Not null
Shop_Address Varchar(150) Supplier Shop Address Not null
Phone_no Numeric(10) Supplier Phone No. Unique, Not null

9. Raw Material

Fields Data Type Description Key Constraint


Material_Id Numeric(10) Material Identification No. Primary Key
Name Varchar(50) Material Name Not null
Quantity Varchar(50) Material Quantity Not null
Supplier_Id Varchar(30) Supplier Identification No. Foreign Key

10.Feedback

Fields Data Type Description Key Constraint


Feedback_Id Numeric(10) Feedback Identification No. Primary Key
User_Id Numeric(10) Customer Identification No. Foreign Key
Feedback_Type Varchar(30) Feedback Type Not null
Message Varchar(150) Feedback Message Not null

2
2.10. MODULES AND THEIR DESCRIPTION

ONLINE PAPER WORK (OPW) is divided into various different modules


which are given below with their description.

1. HOME: - This module is main screen of the website where customer can see
different type of products with their price and picture.

It also contains the other modules of the system like Login, Sign up, Forgot
password, Profile, Category, Search, My Order, My Design, Payment, Bills
Report, feedback and admin.

2. SIGN UP: - This module helps the customer to register and create an account
before booking any order, without any account customer cannot book any order
but can check products as a guest.

3. USER LOGIN: - This module helps the customer to login. After login
customer can manage their profile, book orders also can check booked orders,
payment details etc.

4. FORGOT PASSWORD: - If a customer have already registered their self


but forgot the password, then this module help to recover the password through
email or message on customer’s email id or mobile number.

2
5. PROFILE: - Once the customer login successfully, it can manage their
profile by this module. Here customer can check or update their details like
name, account password, address, mobile phone number, email id etc.

6. CATEGORY: - This module contain all category of products, customer can


easily find the products using this module.

7. SEARCH: - Search module helps the customer to search a product from


many products using product name.

8. MY DESIGN: - If customer is not happy with given product’s designs then,


customer can use this module and can upload their own design and details for
printing the product.

9. MY ORDER: - This module help the customer to check previous booked


orders and there details. Customer can check details like booking time & date,
specification, payment type etc.

10. TRACK ORDER: - Customer can track the booked order using this
module and can check the current status (such as booked, cancelled, processing,
finished, deliver etc.) of the order.

2
11. MAKE PAYMENT: - Customer can make payment using this module. It
contains different types of payment methods (such as Online Banking,
Debit/Credit Card or Cash on Delivery.)

12. BILL REPORT: - This module helps the customer to check previous
payment details. Customer can check the date & time, booked product details,
payment mode, amount etc.

13. FEEDBACK: - Feedback helps to improve the services, by using this


module customer can give feedback.

14. ADMIN: - This module is used by administrators for login and managing
the system such as adding, updating, and deleting of product and category. Also
for checking of details of customers, payments and other report.

2
2.11. PROCESS LOGIC OF MODULES

1. HOME: - Customer need to use web site URL to reach the home page of
Online Paper Work (OPW).

2. SIGN UP PROCESS: - Before booking any order, customer need to register


their self for login process. For this customer need to provide the necessary details
like name, address, mobile phone number, email id, login id, password etc.

3. USER LOGIN PROCESS: - Once the customer register their self, then the
registered user id and password will help for successful login. Customer need to
enter valid combination of user id and password for successful login, otherwise
customer will get a not valid user id or password error.

4. FORGOT PASSWORD PROCESS: - If a customer has forgotten his/her


password then it can be recover. Customer need to enter the registered email id
or phone number, then the password will be sent directly to the customer’s
email id or phone number.

5. PROFILE MANAGE PROCESS: - Customer can check or update their


details from their profile. For update the profile customer need to enter new
details and need to press update button to save new information.

2
6. CATEGORY: - Customer can select and check categories. Customer need to
select category option then the category page will open automatically.

7. SEARCH PROCESS: - Customer need to enter the product name in the search
box and by pressing the search button, the search result appears in the new page.

8. MY DESIGN PROCESS: - For using own design, customer need to select


upload option and select the file of design, then need enter the details as the
product.

9. MY ORDER PROCESS: - Customer will select my order option then next


page show the all previous booked order details and information in the booking
date & time order.

10. TRACK ORDER PROCESS: - Here customer will select booked orders and
can check their current status.

11. MAKE PAYMENT PROCESS: - Customer need to select payment option


if not cash on delivery then need select debit/credit card option and enter other
information like card number, cvv, pin etc. For net banking customer need to
enter information of net banking.

2
12. BILL REPORT PROCESS: - Customer will select bill report option and
the new page will option where customer can see all the payment details, also
can select a single particular details and check summary.

13. FEEDBACK PROCESS: - Customer will select feedback option to send a


feedback. For this customer need to select the type of feedback and write the
message of feedback then press the submit button.

14. ADMIN PROCESS: - Here administrator will enter valid user id and
password for login and after successful login, administrator can use different
option for managing the Online Paper Work (OPW).

2
2.12. REPORT GENERATION

ONLINE PAPER WORK (OPW) will generate the following reports which
is given below:

1. CUSTOMERS REPORT: - This report show the list of customers who are
registered in online paper work (OPW).

2. CATEGORY REPORT: - List of all categories and their details will show by
this report.

3. PRODUCT REPORT: - This report contains the list of all the products and
their details.

4. PRINT JOB ORDER REPORT: - This report show the customer’s booked
orders.

5. PAYMENT REPORT: - Customer’s payment details will show by this report.

6. STAFF REPORT: - All Staff’s details will show by this report.

7. SUPPLIER REPORT: - This report show suppliers details.

8. RAW MATERIAL REPORT: - Raw material details will show by this report.

9. FEEDBACK REPORT: - This report show the customers feedback.

3
2.13. TESTING

Testing is a process of executing a program with the aim of finding error. To


make our software perform well it should be error free. If testing is done
successfully it will remove almost all the errors from the software.

Test Approaches:-

Test can be conducted based on two approaches –

 Functionality Testing
 Implementation Testing

When functionality is being tested without taking the actual implementation in


concern it is known as ‘black-box testing’. The other side is known as ‘white-
box testing’ where implemented code of the software is tested.

Black Box Testing:-

It is perform to test functionality of the program. It is also called ‘Behavioural’


testing. The tester in this case, has a set of input values and respective desired
results. On providing input, if the output matches with the desired results, the
program is tested ‘ok’, otherwise ‘error’.

White Box Testing:-

It is conducted to test program and its implementation, in order to improve


code efficiency or structure. It is also known as ‘Structural’ testing. In this
testing method, the code of the software is tested. This testing is done by
programmers of the software.

3
2.14. SECURITY MECHANISMS

In today’s world security is very important to insure the privacy, confidential


and unauthorized access of data. It can be harmful if someone access the data of
a person. In this project lot of security mechanisms need that no one can access data
of any other person.

Here ‘User id’ and ‘Password’ mechanism is used for login in the online
paper work (OPW). Every person use a different user id and password to access
the system. If a person have correct user id and password combination then it
can access the website otherwise it is not allowed to access.

The database of the system is second and most important part of the system
after the whole system, if system crashes or destroys later it can fix or create but
the data of the system if destroys it is very hard to recover, so it is an important
place where security has to be implemented to secure the date.

Here also ‘User id’ and ‘Password’ mechanism is needed to the secure server
side. Only authorized person can access the data by using their user id and
password which make the system’s privacy, confidentiality, integrity of data
and unauthorized access of the data.

3
2.15. LIMITATION OF THE PROJECT

Due to this project is created to full-fill the educational requirement for


university of a project, main limitation is it’s not a live project and I don’t have
any kind of customer requirement and specification to develop the system.

I have collected information and knowledge from my teachers and friends, also
used the internet to develop this system better. The time is important factor for
developing a system, to create this project’s system only 2 to 3 months are
available, for developing a good system more time required with a team of
expert person with maximum knowledge of code.

The system need better code optimization so that no. of code lines can be
minimized which is make system faster and easy change the code according
change of business. Some more module are required to automate the system for
user and administrator. Testing mechanism which is used for the system is black
box and white box, but for finding any kind of error in the code more testing
phase are required.

3
2.16. FUTURE SCOPE

The system Online Paper Work (OPW) is developed for automate the
booking process of order for printing of paper products. This system not only save
time but also save the money of both parties the end users of the system and as
well as the business.

It is the law of nature, for living long time we need to adept new habits, rules
and technology and need update over self every time to time. For the long life of
this system we will also adept some new feature like more modules, more
testing phase, improving of graphics and design, reducing the code etc.

Online Paper Work (OPW) will adopt the following features in future for
enhancing the project:

 Improving graphics and design.


 Making system more user friendly.
 Implementing more security mechanism.
 Reusing and optimizing the codes.
 Implementing more testing.
 Adding more module.
 Making a backup system in the case of failure.
 Making distributed database system rather than centralized.

3
2.17. BIBLIOGRAPHY

 https://dotnet.microsoft.com/apps/aspnet
 https://www.microsoft.com/en-us/sql-server/default.aspx .
 https://www.lucidchart.com/blog/advantages-of-pert-charts-vs-gantt-
charts
 https://www.guru99.com/software-development-life-cycle-tutorial.html
 https://www.tutorialspoint.com/sdlc/sdlc_waterfall_model.htm
 https://www.geeksforgeeks.org/types-software-testing/
 https://www.tutorialspoint.com/software_engineering/software_t
esting_overview.htm

3
3. PROJECT REPORT

3
3.1. INTRODUCTION AND OBJECTIVE

3.1.1. Introduction:-

Online Paper Work (OPW) is an online service, it will use to computerize


the booking process of printing of paper products. Products like visiting cards,
Posters, Magazines, Letter head, Envelopes, Books, Diaries, Calendars, Bill
books etc. Unlike visiting many printing presses and spending lots of time to book
order for printing, customer can book order online easily.

Online Paper Work (OPW) provide an online platform to book orders where
customer can search product design from the categories and can select the size,
dimension, quantity, paper quality as per the requirements. Customer can also
upload their own design, layout of the document. The project has been
developed to override the problems of manual system. It reduced the no. of
error rate and help in easily maintaining records.

Customer can select page design layout for books, text books, diaries,
Magazines etc. and customer can select many different payment option for
payment. Customer can check booked order and payment reports. In addition
customer need to provide their id prove in some requirement like printing of
letter head etc. (if customer is government employee).

Once the order is placed, printing job can be started according to customer
specification and details. After printing job is done the product can be deliver to
customer registered address.

3
3.1.2. Objective:-

The main objective of Online Paper Work (OPW) is to automate the existing
system so that the customer can book printing order online easily. Using this
system data can be stored for long period with less error rate. It reduce the paper
work and help user to easily get service from long distance.

Online Paper Work (OPW) provide the services to customer in an easy way.
Customer can save time by searching and selecting of product and many available
design in few minutes and can save money by comparing one product with
other.

The printing order can be book from anywhere, any time by spending less amount
of time. Customer not need to go any printing press office and placing order
manually, by using Online Paper Work (OPW) customer can book order from
their home, office or anywhere.

Online Paper Work (OPW) is easy to use and user friendly. Any customer
with basic knowledge of computer and internet can use this website. It is fast
and also better way for placing online orders for printing.

The main objective of this project as follows:

1. Providing a web based system to overcome shortfalls of manual system.

2. Providing various information of products.

3. With the help of this project, making data accessing fast.

4. Reducing the data error and mistakes.

3
3.2. SYSTEM ANALYSIS

3.2.1. Identification Of Need (Problem definition):-

The present manual process of booking order for printing of a


paper product was very time consuming and costly for customers.

First of all, the customer need to search for nearest printing press then
need to spend money and time to visit there office for booking of
order.

After searching and finding the best design of product, customer


gives the design specification and details of printing. Finally customer
pay the amount of printing.

In the whole process customer spend lots of his/her valuable time and
money. Also many time customer can’t find a good looking design so
customer randomly selects a design due to don’t have much time to
check every single design.
Hence customer have to compromise with given designs and quality.

On the other hand in printing press’s office due to all the paper work
done by hand manually, so it increase the risk of error and
redundancy. Also some time it become hard to find a particular
recode and related details.

3
3.2.2. Preliminary investigation:-

As par the identification of need (problem definition), there is need to


convert the manual system into web based computerized system. It
will make fast & easy the process of booking order for printing and
reduce the paper work and error rates. It will help the organization as
well as customer who wants to use the service.

Anyone can use the web site of the given organization from
anywhere any time and as much time he/she want. It will be fast and
easy by online booking instead of visiting the printing press’s office
and meeting face to face for booking order.

In the web site customer can use different types of modules for
searching and selecting of product design, also can upload their own
design if not happy with given designs. Customer can select design
specification and paper quality.

Various payment option will be available for make payment with


home delivery feature if needed. Once the order is place customer can
check and track the current and previous booked orders details,
payment details etc. Also customer can give feedback.

4
3.2.3. Feasibility Study:-

It is to serve as a decision document. Since, whole task in the present


system is done manual with papers and ink by hand so it is much
costly and difficult to use and it is also time consuming.

So automated computerized system online paper work (OPW)


is much feasible, in cost, time, and efforts as compare to the previous
manual system. It is economically feasible.

It will only require a single operator to operate the system, who is


responsible for entering the data into the database via admin interface
provided to him/her, who can also able to check all the data as a form
of report so it also save time. Since it requires only a single person to
operate the whole system thus reduces the cost to operate the system.

For technical feasibility, since the whole system is designed into


the latest technologies like ASP.NET and SQL Server which are the
most recent technologies to develop web based systems and design
databases.

It uses the latest hardware technologies like i3 or up Systems so


easy to operate. It is Behavioural feasible, since the system is
providing an attractive user interface to the operator/end user, so he
feel very easy to work onto it.

Response to operator/end user is very fast and very good. Since, as we


mentioned above that it requires much less amount of cost, it uses
computer work so it is very fast to operate and it is very easy for user
to work on it.

4
3.2.4. Project Planning:-

As per the requirements the online paper work (OPW) contain many
modules that help the customer as well as admin. First of all the
customer use their modules for book order for printing products, next
the admin use their modules to manage the whole system.

The system is going to developed on asp.net which help to create a


quality of web site and for database the sql server will be appropriate,
due to both of software is created by same organisation and it is easy
to connect them.

By using asp.net and sql server, system can be created within less
amount of cost as par the budget. Also it save time due to it required
less amount of code writing if compare to other software’s.

Due to it is a web project there is chance of system failure, hence a


backup system is required for any kind risk management. This backup
system can also be use while upgrading the web site or making any
changes.

4
3.2.5. Project Category:-

ONLINE PAPER WORK (OPW) comes under category of web


based application and RDBMS.

User interact with the website as the front end of the system. The
Data of the system is stored in back end of RDBMS database. The
database help to store and retrieve the data in efficient manner.

The front end of the system will be ASP.NET with C# and SQL
server as the back end. ASP.NET and SQL server both are Microsoft
company software and will be easy connect them. For developing a
web based application asp.net with c# is one of the best combination.
It provide many data library, built in function, concept of oops
(Object Oriented Programming) and easy way to connect with any
database.

SQL server is one of the best database for storing data. It is falls under
RDBMS. Here all data is stored in a relational manner that help to
retrieve and update. It help to maintain the data integrity, consistency,
availability and avoid unauthorized access.

4
3.2.6. TOOLS/PLATFORM

Software:

Platform : Window

Operating System : Window 7 or up

Tools : Microsoft Visual Studio

Front End : Asp.net with c#

Back End : SQL server 2012

Open-Source Framework & Library : Bootstrap 3, JavaScript &

Jquery Web Browser : Google Chrome or any

Server : IIS Manager

Hardware

Processor : Intel Pentium –IV or up

Main Memory (RAM) : 1 GB or up

Network Adaptor : Ethernet Adaptor

Hard Disk : 500 GB or up

4
3.2.7. Project scheduling

Pert (Program Evaluation & Review Technique) Chart:-

Analysis of the existing System Selection & learning of s/w to be used


Day 1 – 14 Problem Day 15 – 23 Day 24 – 66
START14 Days Analysis 8 Days 42 Days

17 Days
Day 67 – 84

Understanding & Creating Database

13 Days
Day 85 – 98

Page Designing

52 Days
Day 99 –151

Coding

4 Days 6 Days 8 Days


Implementation Evaluation Testing

168 -172 Days 161 – 167 Days 152 – 160 Days

4
Gantt Chart:-

Y-Axis

1. Problem Analysis

2. Analysis of the
Existing System

3. Selection &
Learning Of
Software

4. Understanding &
Creating
Database

5. Designing

6. Coding

7. Testing

8. Evaluation

9. Implementation
& Documentation
WEEKS | | | | | | | | | | | | | | | | | | | | | | | | |
MONTHS Oct Nov Dec Jan Feb Mar
X-AXIS

4
3.2.8. Software Requirement Specification (SRS):-

Following SRS is drafted based on above problem statements. IEEE


830 standard-based is used.
1. Introduction:

i) Purpose:

The purpose of the online paper work (OPW) project is to


provide online order booking facility to customers for
printing products here customer can use many different
features to complete the process of booking. Admin can
manage the system and can generate reports.

ii) Scope:

The website to overcome the manual paper work, it save time


and cost also reduce error rates. The website will be reach in
many customer who want to use the service.

iii) Abbreviations:

OPW: Online Paper Work.


Admin: Administrator.
Asp: Active Server Page.
Sql: Structure Query Language.

iv) Overview:

The document is organized as follows: Second section mainly


provides the interfaces and third section provides details
about important functional and non-functional
requirements/use- cases.

4
2. General Description:

i) Product Perspective:

The system mainly contain two parts web application and


database. Both web application as well as database run inside
web server. Web application can access the database and
manage as per requirements.

ii) Product Functions:

The system mainly supports the following function:

 Home – Here customer can check category wise


different type product.
 Category – Here customer can check all categories.
 Sign Up – Here customer can create an account.
 Login – Customer can login using this.
 Profile – Customer can update their details here.
 Search – Customer can check search product here.
 My Order – Customer can check booked order here.
 Track Order – Customer can track status of their order
here.
 Upload Id Proof – Customer can upload their id proof
here (if required).
 Make Payment – Customer can make payment here.
 Bill Reports – Customer can check payment reports here.
 Feedback – Customer can give feedback here.
 Admin – Administrator will use this for managing the
system.

4
iii) User Characteristics:

There are two kinds of users of online paper work (OPW):

 Customer – There user are customers who will access


the system online and use the services using different
kind of function of system.

 Admin – Administrator is responsible for maintaining


the system and will be involved in maintaining the
product, category, order etc.

iv) Constraints:

Following are the main constraints:

 To access the system user required a computer with


internet connection.

 The system works only on those web browsers who


supports the JavaScript and cookies like MSIE, Google
Chrome, Firefox browsers etc.

 The system will not work without JavaScript and


cookies support.

v) Assumptions:

The following are main assumptions:

 The IT department has all the available hardware


required to support the intended user requirement.

 The admin is already work with .net framework.

4
3. Specific Requirements:

This section provides all the details of functional and non-


functional requirements:

3.1. External Interface Requirements:

This section provides all the details of all inputs and outputs
including hardware and software.

3.1.1. User Interfaces:

The application should contain following user interfaces:

 Login page for authenticating registered user. The


screen should accept user id, password and authenticate
user. Also user can “register” their self and use “forgot
password” to get forgotten password.

 Search Page where user can search product using


product name, all the match cases will appear in new
page with product name, price, quantity, description etc.

 Buy page show the product details, customer will select


the specification and fill the details as per requirement.

 Payment page hep the customer to make payment for


selected product.

3.1.2. Hardware Interface:

There is no direct hardware interface specifically for online


paper work (OPW) application. The web application runs on
an application server hosted in-house on enterprise hardware.

5
3.1.3. Software Interface:

The system should work with following interfaces:

 Visual Studio that help to deploy the web site.

 Data Base that help to store and access the data.

3.1.4.Communication Interface:

There are no specific communication interface requirements


for communicating with online paper work (OPW). Existing
OS and network infrastructure will be used for
communication.

3.2. Functional Requirements:

 Login – Registered user will enter valid user id and


password, than user click on login button. If record are
match in data then user get login otherwise user gets an
error of wrong user id or password.

 Search – User will enter product name and then click on


search button. If any records of product matches in the
database then it will show in appropriate manner.

 Buy – User firstly select an product an provide product


specifications and details as per requirement, also upload
reference image or document (if any) then click to buy
button.

 Payment – User will select order for payment and then


select payment option to make payment.

5
3.3. Performance Requirements:

 All the pages should load within 2 seconds.


 Search result should be displayed within 1 second.
 Payment should happen within 5 second after providing
payment information.
 JavaScript provides validity checks for various fields in
the different forms.
 If any of the validations or sequencing flows does not hold
true then appropriate error messages will be prompted to
the user.

3.4. Design Requirements:

 For responsive web pages, should be designed using


HTML 5, JavaScript and bootstrap.
 For reducing load on server client side validation should
be use.

3.5. Software System Attributes Requirements:

3.5.1. Reliability:

System should provide reliable and relevant search results


100% of times. The payment operation should and reliably
within 5 seconds.

3.5.2. Availability:

System should be available 99% of times. All software


upgrades, patches and fixes should be done without shutting
down the application. There should be disaster recovery
environment to handle natural disasters.

5
3.5.3. Security:

Following security standards should be followed:

 Login operation should be performed using transport


layer security (HTTPS).
 All user id and password information should be
encrypted using one way hash algorithms in the
database.
 All input fields should be validated for SQL injection
scenarios.

3.5.4. Maintainability:

The following maintainability features should be supported:

 All the code artefacts should have proper documentation.


 All the components should be thoroughly tested and the
test coverage should be more than 80%.
Appendix:
This Software Requirement Specification (SRS) is developed for
online paper work (OPW). This SRS can be used for real life project.

5
3.2.9. Software Engineering Paradigm (SDLC Model):-

The Software Development Lifecycle (SDLC) is a systematic process for


building software that ensures the quality and correctness of the software built.
SDLC process aims to produce high-quality software which meets customer
expectations. The system development should be complete in the pre-defined
time and cost. There are many type of model available some are given below.

TYPES OF SOFTWARE MODELS:-

1. Waterfall model
2. RAD model
3. Iterative enhancement model
4. Spiral model

Online Paper Work (OPW) is a short project and waterfall model is well
suited. The Waterfall Model was the first model to be introduced. It is also
referred to as a linear-sequential life cycle model.

It is very simple to understand and use. In a waterfall model, each phase


must be completed before the next phase can begin and there is no overlapping
in the phases.

When to use the waterfall model:

 Requirements are very well known, clear and fixed.


 Product definition is stable.
 The project is short.
 There are no ambiguous requirements

5
Advantages of waterfall model:

 Simple and easy to understand and use.


 Easy to manage due to the rigidity of the model.
 Each phase has specific deliverables and a review process.
 Phases are processed and completed one at a time.

Disadvantages of waterfall model:

 High amounts of risk and uncertainty.


 Not a good model for complex and object-oriented projects.
 Not suitable for the projects where requirements are at a moderate
to high risk of changing.
 Once an application is in the testing stage, it is very difficult to go
back and change something that was not well-thought out in the concept
stage.

5
3.2.10. Data Models

Data Flow Diagram (DFD):-

‘0’ Level DFD

Customer
Management Customer Details
Category
Management Category Details
Product
Management Product Details
Design Management Online
Design Details
Paper Work
Order Management (OPW) Order Details

Bills Management Bills Details

Payment Management Payment Details

Administrator Management Administrator Details

5
‘1’ Level DFD

Customer

Online
Guest Paper
Work
(OPW)

Customer Sign Up Customer Details

Forget
Password

Login

Category Product

Upload Manage
Design Manage Profile
Modules
My Order Search
Upload Id
Track Order
Pro
Feedback Make
‘1’Payment
Level Bills Report

5
‘1’ Level DFD

Administrator

Online
Paper
Work (OPW)

Administrator Administrator Details


Login

Category/ Product Utility


Manage
Modules
Printing Orders
Specifications

ID Proof Details Payment Details

Feedback

5
‘2’ Level DFD
Customer

OPW

Customer Customer Details


Register

Login

Profile Manage Customer Details

Product Details
Product/Category Search
Category Details

Product Book Order Details

Design Upload Design Details

ID Proof
Upload ID Proof Details

Payment Bills Payment Details

Track Order
Status Order Details

Report Check Bills Details

Exit
57
‘2’ Level DFD
Administrator

OPW

Login Administrator Details


Administrator

Product Details
Add /
Product/Category Update
/ Delete Category Details

Corner Details
Add / Paper Quality Details
Specifications Update /
Delete Size Details

Page Details

Printing Order Check Order Details

ID Proof Details Check ID Proof Details

Approve/Disapprove Acknowledgement Order Details

Payment
Check Payment Details

Raw Material Details


Add /
Utilit Update / Supplier Details
Delete
Staff Details

Feedback Check Feedback Details

Exit
58
ORDER_PAPER_QUALITY_ID_FK

ORDER_REFERENCE_IMAGE

CUSTOME_PHONE_NO
E-R DIAGRAM ORDER_QUANTITY
ORDER_PAYMENT_TYPE

ORDER_CORNER_ID_FK
CUSTOME_PASSWORD ORDER_DESCRIPTION
CUSTOME_EMAIL_ID ORDER_REFERENCE_PDF

CUSTOME_LOGIN_ID ORDER_STATUS
ORDER_TOTOAL_PRICE
1 M
Customer Book Print Job Order
ORDER_CUSTOMER_ID_FK
CUSTOME_NAME
M M
1 1 1 ORDER_ID
PAYMENT_TYPE
CUSTOMER_ID CUSTOME_ADDRESS ORDER_PRODUCT_ID_FK

ORDER_ID_FK
ORDER_PAGE_ID_FK
M ORDER_SIZE_ID_FK
Make Payment
1
ID_PROOF_IMAGE PAYMENT_ID
PAYMENT_AMOUNT
ID_PROOF_ID ID_PROOF_ORDER_ID_FK
1 M
Give ID Proof
ID_PROOF_DOCUMENT_TYPE ID_PROOF_CUSTOMER_ID_FK

FEEDBACK_ID
FEEDBACK_MESSAGE FEEDBACK_CUSTOMER_ID_FK

M Feedback M
FEEDBACK_TYPE

PRODUCT_PAGE_DESIGN_REQUIRED Receive

PRODUCT_ID_PROOF_REQUIRED PRODUCT_DESCRIPTION Perform


STAFF_NAME
PRODUCT_CATEGORY_ID_FK PRODUCT_IMAGE STAFF_SALARY
N
Check Product STAFF_ID
PRODUCT_PRICE M PRODUCT_ID
CATEGORY_ID M
M Sta
PRODUCT_NAME M
M MANAGE
Category Have STAFF_ADDRESS
CATEGORY_NAME
1
STAFF_DESIGNATION
CATEGORY_IMAGE ADMIN_ STAFF_PHONE_NO
ID
1
1 1
ADMIN_NAME RAW_MATERIAL_ID
Has Administrator 1
Receive
ADMIN_LOGIN_ID
SWORD 1 SUPPLIER_ID_FK
1 ADMIN_EMAIL_ID
ADMIN_PAS M
CORNER_NAME
CORNER_CATEG
ORY_ID_FK
RAW_MATERIAL_NAME Raw Material

M Corner M
RAW_MATERIAL_QUANTITY

CORNER_ID M
PAGE_CATEGORY_ID_FK Manage Provide
PAGE_ID
PAGE_NAME Contact

M Pag M
SUPPLIER_ID
SIZE_NAME SIZE_CATEGORY_ID_FK

1
M Si M M
SIZE_ID Supplier
PAPER_QUALITY_CATEGORY_ID_FK
SUPPLIER_NAME
PAPER_QUALITY_ID
PAPER_QUANTITY_NAME

M M SUPPLIER_PHONE_NUMBER

Paper 59
SUPPLIER_SHOP_ADDRESS
USE CASE DAIGRAM

Search Category/Product

Registration

Book Order

Manage Profile

Upload Design

VISITOR
Track Order

Login

Make Payment CUSTOMER

Check Payment Bills

Feedback

Manage Category/Product

ADMINISTRATOR
Manage Orders

Manage Utility

Manage Specification

Check Payment Details

Report Generation
6
3.3. SYSTEM DESIGN

3.3.1. Modularisation Details:-

ONLINE PAPER WORK (OPW) is divided into various different modules


which are given below with their description. Some of modules are used by
customer and rest of modules used by administrator of the system.

1. HOME: - This module is main screen of the website where customer can
see different type of products with their price and picture.

It also contains the other modules of the system like Login, Sign up, Forgot
password, Profile, Category, Search, My Order, My Design, Payment, Bills
Report, feedback and admin.

2. SIGN UP: - This module helps the customer to register and create an
account before booking any order, without any account customer cannot
book any order but can check products as a guest.

3. USER LOGIN: - This module helps the customer to login. After login
customer can manage their profile, book orders also can check booked
orders, payment details etc.

4. FORGOT PASSWORD: - If a customer have already registered their self


but forgot the password, then this module help to recover the password
through email or message on customer’s email id or mobile number.

6
5. PROFILE: - Once the customer login successfully, it can manage their
profile by this module. Here customer can check or update their details like
name, account password, address, mobile phone number, email id etc.

6. CATEGORY: - This module contain all category of products, customer can


easily find the products using this module.

7. SEARCH: - Search module helps the customer to search a product from


many products using product name.

8. UPLOAD DESIGN: - If customer is not happy with given product’s


designs then, customer can use this option and can upload their own design
and details for printing the product.

9. MY ORDER: - This module help the customer to check previous booked


orders and there details. Customer can check details like booking time & date,
specification, payment type etc.

10.TRACK ORDER: - Customer can track the booked order using this
module and can check the current status (such as booked, cancelled,
processing, finished, deliver etc.) of the order.

6
11.MAKE PAYMENT: - Customer can make payment using this module. It
contains different types of payment methods (such as Online Banking,
Debit/Credit Card or Cash on Delivery.)

12.BILL REPORT: - This module helps the customer to check previous


payment details. Customer can check the date & time, booked product details,
payment mode, amount etc.

13.FEEDBACK: - Feedback helps to improve the services, by using this module


customer can give feedback.

14.ABOUT US: - This module show details about the project.

15.ADMIN: - This module is help administrators for login and managing the
system such as adding, updating, and deleting of product and category. Also
for checking of details of customers, payments and other report.

6
3.3.2. Process Logic Of Modules:-

1. HOME: - Customer need to use web site URL to reach the home page of
Online Paper Work (OPW).

2. SIGN UP PROCESS: - Before booking any order, customer need to register


their self for login process. For this customer need to provide the necessary
details like name, address, mobile phone number, email id, login id, password
etc.

3. USER LOGIN PROCESS: - Once the customer register their self, then the
registered user id and password will help for successful login. Customer need
to enter valid combination of user id and password for successful login,
otherwise customer will get a not valid user id or password error.

4. FORGOT PASSWORD PROCESS: - If a customer has forgotten his/her


password then it can be recover. Customer need to enter the registered email
id or phone number, then the password will be sent directly to the customer’s
email id or phone number.

5. PROFILE MANAGE PROCESS: - Customer can check or update their


details from their profile. For update the profile customer need to enter new
details and need to press update button to save new information.

6
6. CATEGORY: - Customer can select and check categories. Customer need to
select category option then the category page will open automatically.

7. SEARCH PROCESS: - Customer need to enter the product name in the search
box and by pressing the search button, the search result appears in the new
page.

8. UPLOAD DESIGN PROCESS: - For using own design, customer need to


select upload option and select the file of design, then need enter the details
as the product.

9. MY ORDER PROCESS: - Customer will select my order option then next


page show the all previous booked order details and information in the
booking date & time order.

10. TRACK ORDER PROCESS: - Here customer will select booked orders
and can check their current status.

11. MAKE PAYMENT PROCESS: - Customer need to select payment


option if not cash on delivery then need select debit/credit card option and enter
other information like card number, cvv, pin etc. For net banking customer
need to enter information of net banking.

6
12. BILL REPORT PROCESS: - Customer will select bill report option
and the new page will option where customer can see all the payment details,
also can select a single particular details and check summary.

13. FEEDBACK PROCESS: - Customer will select feedback option to send


a feedback. For this customer need to select the type of feedback and write
the message of feedback then press the submit button.

14. ABOUT US PROCESS: - Here customer can see the details about
project report.

15. ADMIN PROCESS: - Here administrator will enter valid user id and
password for login and after successful login, administrator can use different
option for managing the Online Paper Work (OPW).

6
3.3.3. Data Integrity And Constraints:-

Online Paper Work (OPW) will use pre-define integrity to maintain accuracy
and consistency of data in the database table which are given below:

Entity Integrity:

 Primary Key: It is use to enter the unique, not null and single records
in the table’s attribute field.

 Unique Key: It is use to enter unique record in the table’s attribute field.

 Not Null: It is use to ensure data in the table attribute should not be null.

 Identity: It is use to auto increment the numeric value of any


attribute field.

Referential Integrity:

 Foreign Key: A foreign key is used to link two tables together. A


foreign key is a field in one that refers to the primary key in another
table.

6
3.3.4. Database Design:-

1. Customer

Fields Data Type Description Key Constraint


CUSTOMER_ID Int Customer Identification No. Primary key, Identity(1,1)
CUSTOMER_LOGIN_ID Varchar(50) Customer Login Id Unique, Not null
CUSTOMER_PASSWORD Varchar(50) Customer Login Password Not null
CUSTOMER_NAME Varchar(30) Customer Name Not null
CUSTOMER_PHONE_NO Numeric(10) Customer Phone No. Unique, Not null
CUSTOMER_EMAIL_ID Varchar(50) Customer Email Unique, Not null
CUSTOMER_ADDRESS Varchar(MAX) Customer Address Not null

2. Category

Fields Data Type Description Key Constraint


CATEGORY_ID Int Category Identification No. Primary key, Identity(1,1)
CATEGORY_NAME Varchar(30) Category Name Not null
CATEGORY_IMAGE Varchar(MAX) Category Image Address Not null

6
3. Product

Fields Data Type Description Key


Constraint
PRODUCT_ID Int Product Identification No. Primary key,
Identity(1,1)
PRODUCT_NAME Varchar(30) Product Name Not null
PRODUCT_PRICE Int Product Price Not null
PRODUCT_QUANTITY Int Product Quantity Not null
PRODUCT_DESCRIPTION Varchar(MAX) Product Description Not null
PRODUCT_IMAGE Varchar(MAX) Product Image Address Not null
PRODUCT_PAGE_DESIGN_REQUIRED Bit Product Page Design Not null
PRODUCT_ID_PROOF_REQUIRED Bit Product Id Proof Not null
PRODUCT_CATEGORY_ID_FK Int Category Identification No. Foreign key,
Not null

6
4. Print Job Order

Fields Data Type Description Key Constraint


ORDER_ID Int Order Identification No. Primary key, Identity(1,1)
ORDER_PRODUCT_ID_FK Int Product Id No. Foreign key, Not null
ORDER_CUSTOMER_ID_FK Int Customer Id No. Foreign key, Not null
ORDER_CORNER_ID_FK Int Corner Identification No. Foreign key, Not null
ORDER_PAPER_QUALITY_ID_FK Int Paper Qualtity Id. No. Foreign key, Not null
ORDER_SIZE_ID_FK Int Order Size Not null
ORDER_QUANTITY Int Order Quantity Not null
ORDER_PAGE_ID_FK Int Order Paper Id. No. Foreign key, Null
ORDER_REFERENCE_IMAGE Varchar(Max) Order Reference Image Null
ORDER_REFERENCE_PDF Varchar(Max) Order Reference Pdf Null
ORDER_TOTAL_PRICE Int Order Totoal Amount Not null
ORDER_PAYMENT_TYPE Varchar(30) Order Payment Type Not null
ORDER_STATUS Varchar(150) Order Status Not null
ORDER_DESCRIPTION Varchar(Max) Order Description Not null

7
5. ID Proof

Fields Data Type Description Key Constraint


ID_PROOF_ID Int Identity Proof No. Primary key, Identity(1,1)
ID_PROOF_CUSTOMER_ID_FK Int Customer Identification No. Foreign key, Not null
ID_PROOF_ORDER_ID_FK Int Order Identitication No. Foreign key, Not null
ID_PROOF_DOCUMENT_TYPE Varchar(30) Identity Document Type Not null
ID_PROOF_IMAGE Varchar(MAX) Identity Image Address Not null

6. Payment

Fields Data Type Description Key Constraint


PAYMENT_ID Int Payment Identification No. Primary key, Identity(1,1)
ORDER_ID_FK Int Order Identification No. Foreign key, Not null
PAYMENT_TYPE Varchar(30) Payment Type Not null
PAYMENT_AMOUNT Int Payment Amount Not null

7
7. Feedback

Fields Data Type Description Key Constraint


FEEDBACK_ID Int Feedback Identification No. Primary key, Identity(1,1)
FEEDBACK_CUSTOMER_ID Int Customer Identification No. Foreign key, Not null
FEEDBACK_TYPE Varchar(30) Feedback Type Not null
FEEDBACK_MESSAGE Varchar(Max) Feedback Message Not null

8. Administrator

Fields Data Type Description Key Constraint


ADMIN_ID Int Administrator Identification No. Primary Key, Identity(1,1)
ADMIN_LOGIN_ID Varchar(50) Administrator Login Id Unique, Not null
ADMIN_PASSWORD Varchar(50) Administrator Password Not null
ADMIN_NAME Varchar(30) Administrator Name Not null
ADMIN_EMAIL_ID Varchar(50) Administrator Email Unique, Not null

7
9. Corner

Fields Data Type Description Key Constraint


CORNER_ID Int Corner Identification Primary key, Identity(1,1)
No.
CORNER_NAME Varchar(30) Corner Name Not null
CORNER_CATEGORY_ID_FK Int Category Id. No. Foreign key, Not null

10. Paper Quality

Fields Data Description Key Constraint


Type
PAPER_QUALITY_ID Int Paper Quality Id. No. Primary key, Identity(1,1)
PAPER_QUALITY _NAME Varchar(30) Paper Quality Name Not null
PAPER_QUALITY_CATEGORY_ID_FK Int Category Id. No Foreign key, Not null

7
11. Size

Fields Data Type Description Key Constraint


SIZE_ID Int Size Identification No. Primary key, Identity(1,1)
SIZE _NAME Varchar(30) Size Name Not null
SIZE _CATEGORY_ID_FK Int Category Id. No. Foreign key, Not null

12. Page

Fields Data Type Description Key Constraint


PAGE_ID Int Page Identification No. Primary key, Identity(1,1)
PAGE _NAME Varchar(30) Page Name Not null
PAGE _CATEGORY_ID_FK Int Category Identification Foreign key, Not null
No.

7
13. Staff

Fields Data Type Description Key Constraint


STAFF_ID Int Staff Identification No. Primary Key, Identity(1,1)
STAFF _NAME Varchar(30) Staff Name Not null
STAFF_ADDRESS Varchar(30) Staff Address Not null
STAFF_PHONE_NO Numeric(10) Staff Phone No. Not null
STAFF_DESIGNATION Varchar(150) Staff Designation Not null
STAFF_SALARY Int Staff Salary Not null

14. Supplier

Fields Data Type Description Key Constraint


SUPPLIER_ID Int Supplier Id. No. Primary Key, Identity(1,1)
SUPPLIER_NAME Varchar(30) Supplier Name Not null
SUPPLIER_SHOP_ADDRESS Varchar(Max) Supplier Shop Address Not null
SUPPLIER_PHONE_NO. Varchar(10) Supplier Phone No. Not null

7
15. Raw Material

Fields Data Description Key Constraint


Type
RAW_MATERIAL_ID Int Material Id. No. Primary key, Identity(1,1)
RAW_MATERIAL_NAME Varchar(30) Material Name Not null
RAW_MATERIAL_QUANTITY Varchar(30) Material Quantity Not null
SUPPLIER_ID_FK Int Supplier Id. No. Foreign key, Not null

7
3.3.5. User Interface Design:-

Home:-

7
7
Category:-

Products of single category (Magazine):-

7
Products of single category (Visiting Card):-

Products of single category (Text Box):-

8
Search Result:-

Customer Sign Up:-

8
Customer Sign Up Complete:-

Customer Login:-

Customer Login with Wrong User and Password:-

Customer Forgot Password:-

8
Product Booking:-

Review Order:-

8
Order Booking Complete:-

Make Payment:-

Debit/Credit Card Payment:-

8
After Make Payment:-

My Order:-

Track Order:-

8
Bill Report:-

Cancel Order:-

Feedback:-

8
About Us:-

8
Profile Update:-

Upload Id Proof:-

8
Administrator Login:-

8
Administrator Show Category:-

Create Category:-

9
Update Category:-

Delete Category:-

9
Create Product:-

Show Product (Note Pad Category):-

9
Update Product:-

Delete Product:-

9
Printing Order:-

ID Proof Details:-

Payment Details:-

9
Feedback Details:-

Corner Details:-

Paper Quality Details:-

9
Size Details:-

Page Details:-

Supplier Details:-

9
Raw Material Details:-

Staff Details:-

9
3.4. CODING

3.4.1. SQL commands:-

Database & tables creation:-

CREATE DATABASE OnlinePaperWork;


USE OnlinePaperWork;

Customer:-
CREATE TABLE tbl_CUSTOMER(
CUSTOMER_ID INT PRIMARY KEY IDENTITY(1,1),
CUSTOMER_LOGIN_ID VARCHAR(50) NOT NULL UNIQUE,
CUSTOMER_PASSWORD VARCHAR(50) NOT NULL,
CUSTOMER_NAME VARCHAR(30) NOT NULL,
CUSTOMER_PHONE_NO VARCHAR(10) NOT NULL UNIQUE,
CUSTOMER_EMAIL_ID VARCHAR(50) NOT NULL UNIQUE,
CUSTOMER_ADDRESS VARCHAR(MAX) NOT NULL
);

Category:-
CREATE TABLE tbl_CATEGORY(
CATEGORY_ID INT primary key identity(1,1),
CATEGORY_NAME VARCHAR(30) NOT NULL,
CATEGORY_IMAGE VARCHAR(MAX) NOT NULL
);

Product:-

CREATE TABLE tbl_PRODUCT(


PRODUCT_ID INT primary key identity(1,1),
PRODUCT_NAME VARCHAR(30) NOT NULL,
PRODUCT_PRICE INT NOT NULL,
PRODUCT_QUANTITY INT NOT NULL,
PRODUCT_DESCRIPTION VARCHAR(MAX) NOT NULL,
PRODUCT_IMAGE VARCHAR(MAX) NOT NULL,
PRODUCT_PAGE_DESIGN_REQUIRED BIT NOT NULL,
PRODUCT_ID_PROOF_REQUIRED BIT NOT NULL,
PRODUCT_CATEGORY_ID_FK INT REFERENCES tbl_CATEGORY(CATEGORY_ID) NOT NULL
);

9
Print Job Order:-

CREATE TABLE tbl_PRINT_JOB_ORDER(


ORDER_ID INT PRIMARY KEY IDENTITY(1,1),
ORDER_PRODUCT_ID_FK INT REFERENCES tbl_PRODUCT(PRODUCT_ID) NOT NULL,
ORDER_CUSTOMER_ID_FK INT REFERENCES tbl_CUSTOMER(CUSTOMER_ID) NOT NULL,
ORDER_CORNER_ID_FK INT REFERENCES tbl_PRODUCT_CORNER(CORNER_ID) NOT NULL,
ORDER_PAPER_QUALITY_ID_FK INT REFERENCES tbl_PRODUCT_PAPER_QUALITY
(PAPER_QUALITY_ID) NOT NULL,
ORDER_SIZE_ID_FK INT REFERENCES tbl_PRODUCT_SIZE(SIZE_ID) NOT NULL,
ORDER_QUANTITY INT NOT NULL,
ORDER_PAGE_ID_FK INT null REFERENCES tbl_PRODUCT_PAGE(PAGE_ID),
ORDER_REFERENCE_IMAGE VARCHAR(MAX) NULL,
ORDER_REFERENCE_PDF VARCHAR(MAX) NULL,
ORDER_TOTAL_PRICE INT NOT NULL,
ORDER_PAYMENT_TYPE VARCHAR(30) NOT NULL,
ORDER_STATUS VARCHAR(150) NOT NULL,
ORDER_DESCRIPTION VARCHAR(MAX) NOT NULL
);

ID Proof:-
CREATE TABLE tbl_ID_PROOF(
ID_PROOF_ID INT PRIMARY KEY IDENTITY(1,1),
ID_PROOF_CUSTOMER_ID_FK INT REFERENCES tbl_CUSTOMER(CUSTOMER_ID) NOT NULL,
ID_PROOF_ORDER_ID_FK INT REFERENCES tbl_PRINT_JOB_ORDER(ORDER_ID) NOT NULL,
ID_PROOF_DOCUMENT_TYPE VARCHAR(30) NOT NULL,
ID_PROOF_IMAGE VARCHAR(MAX) NOT NULL
);

Payment:-
CREATE TABLE tbl_PAYMENT(
PAYMENT_ID INT PRIMARY KEY IDENTITY(1,1),
ORDER_ID_FK INT REFERENCES tbl_PRINT_JOB_ORDER(ORDER_ID) NOT NULL,
PAYMENT_TYPE VARCHAR(30) NOT NULL,
PAYMENT_AMOUNT INT NOT NULL
);

Feedback:-
CREATE TABLE tbl_FEEDBACK(
FEEDBACK_ID INT PRIMARY KEY IDENTITY(1,1),
FEEDBACK_CUSTOMER_ID_FK INT REFERENCES tbl_CUSTOMER(CUSTOMER_ID) NOT NULL,
FEEDBACK_TYPE VARCHAR(30) NOT NULL,
FEEDBACK_MESSAGE VARCHAR(MAX) NOT NULL
);

9
Administrator:-
create table tbl_ADMINISTRATOR(
ADMIN_ID INT primary key identity(1,1),
ADMIN_NAME varchar(30) not null,
ADMIN_LOGIN_ID VARCHAR(50) NOT NULL UNIQUE,
ADMIN_PASSWORD VARCHAR(50) NOT NULL,
ADMIN_EMAIL_ID VARCHAR(50) NOT NULL
);

INSERT INTO tbl_ADMINISTRATOR VALUES('Pawan','admin','12345','pawan@gmail.com');

Corner:-
CREATE TABLE tbl_PRODUCT_CORNER(
CORNER_ID INT PRIMARY KEY IDENTITY(1,1),
CORNER_NAME VARCHAR(30) NOT NULL,
CORNER_CATEGORY_ID_FK INT REFERENCES tbl_CATEGORY(CATEGORY_ID) NOT NULL,
);

Paper Quality:-
CREATE TABLE tbl_PRODUCT_PAPER_QUALITY(
PAPER_QUALITY_ID INT PRIMARY KEY IDENTITY(1,1),
PAPER_QUALITY_NAME VARCHAR(30) NOT NULL,
PAPER_QUALITY_CATEGORY_ID_FK INT REFERENCES tbl_CATEGORY(CATEGORY_ID) NOT NULL,
);

Size:-
CREATE TABLE tbl_PRODUCT_SIZE(
SIZE_ID INT PRIMARY KEY IDENTITY(1,1),
SIZE_NAME VARCHAR(30) NOT NULL,
SIZE_CATEGORY_ID_FK INT REFERENCES tbl_CATEGORY(CATEGORY_ID) NOT NULL,
);

Page:-
CREATE TABLE tbl_PRODUCT_PAGE(
PAGE_ID INT PRIMARY KEY IDENTITY(1,1),
PAGE_NAME VARCHAR(30) NOT NULL,
PAGE_CATEGORY_ID_FK INT REFERENCES tbl_CATEGORY(CATEGORY_ID) NOT NULL,
);

1
Staff:-
CREATE TABLE tbl_STAFF(
STAFF_ID INT PRIMARY KEY IDENTITY(1,1),
STAFF_NAME VARCHAR(30) NOT NULL,
STAFF_ADDRESS VARCHAR(30) NOT NULL,
STAFF_PHONE_NO VARCHAR(10) NOT NULL,
STAFF_DESIGNATION VARCHAR(150) NOT NULL,
STAFF_SALARY INT NOT NULL
);

Supplier:-
CREATE TABLE tbl_SUPPLIER(
SUPPLIER_ID INT PRIMARY KEY IDENTITY(1,1),
SUPPLIER_NAME VARCHAR(30) NOT NULL,
SUPPLIER_SHOP_ADDRESS VARCHAR(MAX) NOT NULL,
SUPPLIER_PHONE_NUMBER VARCHAR(10) NOT NULL
);

Raw Material:-
CREATE TABLE tbl_RAW_MATERIAL(
RAW_MATERIAL_ID INT PRIMARY KEY IDENTITY(1,1),
RAW_MATERIAL_NAME VARCHAR(30) NOT NULL,
RAW_MATERIAL_QUANTITY VARCHAR(30) NOT NULL,
SUPPLIER_ID_FK INT REFERENCES tbl_SUPPLIER(SUPPLIER_ID) NOT NULL
);

1
3.4.2. Project Coding including (comments & description, standardization,
code efficiency, error handling, parameters calling/passing and validation

checks) :-

_LayoutCustomer.cshtml:-
<!DOCTYPE html> @*Doctype tag*@
<html> @*Html tag*@
<head> @*Head tag*@

@*Title of the project in titile tag*@


<title>@ViewBag.Title - Online Paper Work(OPW)</title>

@*Including CDN (content delivery network) links*@


<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min
.js">
</script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js">
</script>

@*Including bundle config*@


@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")

</head> @*Head tag closing*@

@*Body tag*@
<body class="bg-light">
<div class="d-flex p-2 bg-info text-white">
<b>ONLINE PAPER WORK (OPW)</b>
</div>

@*Navigation bar button and links*@


<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
@Html.ActionLink("Home", "Home", "Customer", null, new { @class = "navbar-
brand" })
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

@*Navigation link according with users session*@


<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
@Html.ActionLink("Category", "Category", "Customer", null, new
{ @class = "nav-link" })
</li>
@if (Session["CustomerId"] != null)
{
1
<li class="nav-item">
@Html.ActionLink("My Order", "MyOrder", "Customer", null,
new { @class = "nav-link" })
</li>
<li class="nav-item">
@Html.ActionLink("Track Order", "TrackOrder", "Customer",
null, new { @class = "nav-link" })
</li>
<li class="nav-item">
@Html.ActionLink("Upload Id Proof",
"ProductForUploadIdProof", "Customer", null, new { @class = "nav-link" })
</li>
<li class="nav-item">
@Html.ActionLink("Make Payment", "ShowProductForPayment",
"Customer", null, new { @class = "nav-link" })
</li>
<li class="nav-item">
@Html.ActionLink("Bill Report", "BillReport", "Customer",
null, new { @class = "nav-link" })
</li>
<li class="nav-item">
@Html.ActionLink("Feedback", "Feedback", "Customer", null,
new { @class = "nav-link" })
</li>
}
<li class="nav-item">
@Html.ActionLink("About us", "AboutUs", "Customer", null, new
{ @class = "nav-link" })
</li>
</ul>

@*Customer login,signup,profile,logout and admin login,logout*@


<div class="navbar-nav">
<div class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#"
id="navbarDropdownProduct" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
@if (Session["CustomerId"] == null)
{
@: Customer
}
else
{
@Session["CustomerName"]
}
</a>
<div class="dropdown-menu" aria-
labelledby="navbarDropdownProduct">
@if (Session["CustomerID"] == null)
{
@Html.ActionLink("Login", "Login", "Customer", null,
new { @class = "dropdown-item" })
@Html.ActionLink("Forgot Password", "ForgotPassword",
"Customer", null, new { @class = "dropdown-item" })
@Html.ActionLink("Sign Up", "SignUp", "Customer",
null, new { @class = "dropdown-item" })

@Html.ActionLink("Admin", "Login", "Administrator",


null, new { @class = "dropdown-item" })

1
}
else
{
@Html.ActionLink("Profile", "Profile", "Customer",
null, new { @class = "dropdown-item" })
@Html.ActionLink("Logout", "Logout", "Customer", null,
new { @class = "dropdown-item" })
}
</div>
</div>
</div>

@*Search textbox and button*@


<div class="form-inline my-2 my-lg-0">
@using (Html.BeginForm("SearchProduct", "Customer",
FormMethod.Post))
{
@Html.TextBox("searchParameter", null, new { @class = "form-
control mr-sm-2", @placeholder = "Search" })
<input type="submit" value="search" class="btn btn-outline-
success my-2 my-sm-0" />
}
</div>
</div>
</nav> @*Navigation bar tag closing*@

@*Render body session*@


<div class="container body-content mt-3">
<div class="loader"></div>

@*Onload message jquery*@


@if (TempData["Message"] != null)
{
<script type="text/javascript">
window.onload = function () {
alert('@TempData["Message"]');
return false;
};
</script>
}

@*Render body*@
@RenderBody()
<hr />

@*Footer*@

<footer>
<p>Online Paper Work(OPW)</p>
</footer>
</div>

@*Bundle config for bootstrap files*@


@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)

</body> @*Body tag closing*@


</html> @*Html tag closing*@

1
Customer SignUp.cshtml
@model OnlinePaperWork_OPW_.Models.tbl_CUSTOMER @*Model*@
@{
ViewBag.Title = "Customer Sign Up"; @*Page title*@
}

@*Customer signup submittion form*@


@using (Html.BeginForm("SignUp", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Login Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_LOGIN_ID, new {
@class = "form-control", @placeholder = "Login Id" })
@Html.ValidationMessageFor(x => x.CUSTOMER_LOGIN_ID,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Password</label>
@Html.TextBoxFor(x => x.CUSTOMER_PASSWORD, new {
@class = "form-control", @placeholder = "Password" })
@Html.ValidationMessageFor(x => x.CUSTOMER_PASSWORD,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Confirm Password</label>
@Html.TextBoxFor(x => x.CUSTOMER_CONFIRM_PASSWORD, new
{ @class = "form-control", @placeholder = "Confirm Password" })
@Html.ValidationMessageFor(x =>
x.CUSTOMER_CONFIRM_PASSWORD, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Name</label>
@Html.TextBoxFor(x => x.CUSTOMER_NAME, new { @class
= "form-control", @placeholder = "Name" })
@Html.ValidationMessageFor(x => x.CUSTOMER_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone No</label>
@Html.TextBoxFor(x => x.CUSTOMER_PHONE_NO, new {
@class = "form-control", @placeholder = "Phone No" })
@Html.ValidationMessageFor(x => x.CUSTOMER_PHONE_NO,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Email Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_EMAIL_ID, new {
@class = "form-control", @placeholder = "Email Id" })
@Html.ValidationMessageFor(x => x.CUSTOMER_EMAIL_ID,
"", new { @class = "text-danger" })

1
</div>
<div class="form-group">
<label>Address</label>
@Html.TextAreaFor(x => x.CUSTOMER_ADDRESS, new {
@class = "form-control", @placeholder = "Address" })
@Html.ValidationMessageFor(x => x.CUSTOMER_ADDRESS,
"", new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning " })
<input type="submit" value="Sign Up" class="btn
btn-outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}

Customer ForgotPassword.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_CUSTOMER @*Model*@
@{
ViewBag.Title = "Forgot Password"; @*Page title*@
}

@*Customer forgot password submittion form*@


@using (Html.BeginForm("ForgotPassword", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Login Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_LOGIN_ID, new {
@class = "form-control", @placeholder = "Login Id" })
@Html.ValidationMessageFor(x => x.CUSTOMER_LOGIN_ID,
"", new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning " })
<input type="submit" value="Get Password"
class="btn btn-outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>

1
</div>
</div>
}

Customer Login.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_CUSTOMER @*Model*@
@{
ViewBag.Title = "Customer Login"; @*Page title*@
}

@*Customer login form*@


@using (Html.BeginForm("Login", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Login Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_LOGIN_ID, new {
@class = "form-control", @placeholder = "Login Id" })
@Html.ValidationMessageFor(x => x.CUSTOMER_LOGIN_ID,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Password</label>
@Html.PasswordFor(x => x.CUSTOMER_PASSWORD, new {
@class = "form-control", @placeholder = "Password" })
@Html.ValidationMessageFor(x => x.CUSTOMER_PASSWORD,
"", new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning" })
<input type="submit" value="Login" class="btn btn-
outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}

Customer Profile.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_CUSTOMER @*Model*@
@{
ViewBag.Title = "Profile"; @*Page title*@
}

1
@*Customer profile form*@
@using (Html.BeginForm("Profile", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
@Html.HiddenFor(x=>x.CUSTOMER_ID)
<label>Login Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_LOGIN_ID, new {
@class = "form-control", @placeholder = "Login Id", @readonly = "readonly" })
@Html.ValidationMessageFor(x => x.CUSTOMER_LOGIN_ID,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Password</label>
@Html.PasswordFor(x => x.CUSTOMER_PASSWORD, new {
@class = "form-control", @placeholder = "Password" })
@Html.ValidationMessageFor(x => x.CUSTOMER_PASSWORD,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Confirm Password</label>
@Html.PasswordFor(x => x.CUSTOMER_CONFIRM_PASSWORD,
new { @class = "form-control", @placeholder = "Confirm Password" })
@Html.ValidationMessageFor(x =>
x.CUSTOMER_CONFIRM_PASSWORD, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Name</label>
@Html.TextBoxFor(x => x.CUSTOMER_NAME, new { @class
= "form-control", @placeholder = "Name" })
@Html.ValidationMessageFor(x => x.CUSTOMER_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone No</label>
@Html.TextBoxFor(x => x.CUSTOMER_PHONE_NO, new {
@class = "form-control", @placeholder = "Phone No" })
@Html.ValidationMessageFor(x => x.CUSTOMER_PHONE_NO,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Email Id</label>
@Html.TextBoxFor(x => x.CUSTOMER_EMAIL_ID, new {
@class = "form-control", @placeholder = "Email Id" })
@Html.ValidationMessageFor(x => x.CUSTOMER_EMAIL_ID,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Address</label>
@Html.TextAreaFor(x => x.CUSTOMER_ADDRESS, new {
@class = "form-control", @placeholder = "Address" })

1
@Html.ValidationMessageFor(x => x.CUSTOMER_ADDRESS,
"", new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning " })
<input type="submit" value="Update" class="btn
btn-outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}

Home.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT> @*List type
model*@ @{
ViewBag.Title = "Home"; @*Page title*@
}

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Records Found....</h3>
}
else
{

@*For each loop to show categories details*@


foreach (var category in ViewBag.categorylistBag)
{
<div class="card" style="height:400px ; overflow-y:scroll">
<div class="card-body">
<h5>
@category.CATEGORY_NAME
@Html.ActionLink("More", "CategoryProduct", new { categoryId =
category.CATEGORY_ID }, new { @class = "btn btn-outline-info float-right" })
</h5>
<hr />
<div class="row">

@*For each loop to show products details*@


@foreach (var product in Model.Where(x =>
x.PRODUCT_CATEGORY_ID_FK == category.CATEGORY_ID))
{
<div class="col-sm-3">
<a href="@Url.Action("ProductDetails", "Customer", new
{ productId = product.PRODUCT_ID, categoryId = product.PRODUCT_CATEGORY_ID_FK },
null)">
<img src="@Url.Content(product.PRODUCT_IMAGE)"
class="card-img-top" height="200" />
<div class="card-body">
<h6>@product.PRODUCT_NAME</h6>
<h6>Price : Rs.@product.PRODUCT_PRICE</h6>

1
<h6>Quantity :@product.PRODUCT_QUANTITY
Pec</h6>
</div>
</a>
</div>
}
</div>
</div>
</div>
<br />
}
}

Category.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_CATEGORY> @*List type
model*@ @{
ViewBag.Title = "Category"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Records Found....</h3>
}
else
{
<div class="row">

@*For each loop to show categories details*@


@foreach (var category in Model)
{
<div class="col-sm-4 mt-3 d-flex justify-content-center">
<div class="card text-center" style="width: 21rem;">
<a href="@Url.Action("CategoryProduct", "Customer", new {
categoryId = category.CATEGORY_ID })">
<img
src="@Url.Content(category.CATEGORY_IMAGE)" class="card-img-top"
height="250" />
<div class="card-body">
<h4>@category.CATEGORY_NAME</h4>
</div>
</a>
</div>
</div>
}
</div>
}

CategoryProduct.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT> @*List type
model*@ @{
ViewBag.Title = "Category Product"; @*Page title*@
}

<h4>@ViewBag.categoryNameBag</h4>

1
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Records Found....</h3>
}
else
{
<div class="row">

@*For each loop to show products details*@


@foreach (var product in Model)
{
<div class="col-sm-4 mt-3 d-flex justify-content-center">
<div class="card" style="width: 18rem;">
<img src="@Url.Content(product.PRODUCT_IMAGE)" class="card-
img-top" height="250" />
<div class="card-body">
<h5>@product.PRODUCT_NAME</h5>
<h6>Price : Rs.@product.PRODUCT_PRICE</h6>
<h6>Quantity: @product.PRODUCT_QUANTITY pec</h6>
@Html.ActionLink("View", "ProductDetails", "Customer", new
{ productId = product.PRODUCT_ID, categoryId = product.PRODUCT_CATEGORY_ID_FK },
new { @class = "btn btn-outline-primary float-right" })
</div>
</div>
</div>
}
</div>
<br />
}

SearchProduct.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT> @*List type
model*@ @{
ViewBag.Title = "Search Result"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Products Found...</h4>
}
else
{

@*For each loop to show products details*@


foreach (var product in Model)
{
<div class="card">
<div class="card-body">
<div class="col-sm-12">
<div class="form-row">

1
<img class="col-sm-4 justify-content-center"
src="@Url.Content(product.PRODUCT_IMAGE)" height="300" width="350" />
<div class="col-sm-8">
<h2>@product.PRODUCT_NAME</h2>
<hr />
<h3>Price : Rs.@product.PRODUCT_PRICE</h3>
<h3>Quantity : @product.PRODUCT_QUANTITY Pec</h3>
<br />
<h6>Description:</h6>
<h5>@product.PRODUCT_DESCRIPTION</h5>
<hr />
@Html.ActionLink("Buy", "ProductDetails", "Customer",
new { productId = product.PRODUCT_ID, categoryId = product.PRODUCT_CATEGORY_ID_FK
}, new { @class = "btn btn-outline-primary float-right" })
</div>
</div>
</div>
</div>
</div>
<br />
}
}

ProductDetails.cshtml:- (Booking page)


@model OnlinePaperWork_OPW_.Models.OrderDetailsModel @*Model*@
@{
ViewBag.Title = "Product Details"; @*Page title*@
}

@*Product details*@
<div class="container">
<div class="card">
<div class="card-body">
<div class="col-sm-12">
<div class="row">
<img class="col-sm-4 d-flex justify-content-center"
src="@Url.Content(Model.PRODUCT_IMAGE)" height="300" width="350" />
<div class="col-sm-8">
<h2>@Model.PRODUCT_NAME</h2>
<hr />
<h3>Price : Rs.@Model.PRODUCT_PRICE</h3>
<h3>Quantity : @Model.PRODUCT_QUANTITY Pec</h3>
<br />
<h6>Description:</h6>
<h5>@Model.PRODUCT_DESCRIPTION</h5>
</div>
</div>
</div>
</div>
</div>
</div>
<br />

@*Product details filling form to book order*@


@using (Html.BeginForm("BookOrder", "Customer", FormMethod.Post, new { enctype =
"multipart/form-data" }))

1
{
<div class="container">
<div class="card">
<div class="card-body">
<div class="form-row">
<div class="col-sm-6">
@Html.HiddenFor(x => x.PRODUCT_ID, new { id = "product_id"
})
<div class="form-group">
<label>Corners</label>
@Html.DropDownListFor(x =>
x.ORDER_CORNER_ID,
ViewBag.cornerDetailsBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.ORDER_CORNER_ID, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Paper Quality</label>
@Html.DropDownListFor(x => x.ORDER_PAPER_QUALITY_ID,
ViewBag.paperQualityDetailsBag as SelectList, "-----Select-----", new { @class =
"form-control" })
@Html.ValidationMessageFor(x =>
x.ORDER_PAPER_QUALITY_ID, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Size</label>
@Html.DropDownListFor(x => x.ORDER_SIZE_ID,
ViewBag.sizeDetailsBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.ORDER_SIZE_ID, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Quantity</label>
<div class="form-row col-sm-12">
@Html.TextBoxFor(x => x.ORDER_QUANTITY, new { type
= "number", Value = "1", min = "1", max = "10", step = "1", @class = "col-sm-3
form-control", id = "selectedNumber" })
<div class="form-control col-sm-9">
<label
id="price">@Model.PRODUCT_QUANTITY</label>
<label id="calculate">#</label>
</div>
</div>
</div>
@if (Model.PRODUCT_PAGE_DESIGN_REQUIRED == true)
{
<div class="form-group">
<label>Page Design</label>
@Html.DropDownListFor(x => x.ORDER_PAGE_ID,
ViewBag.pageDetailsBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.ORDER_PAGE_ID,
"", new { @class = "text-danger" })
</div>
}
</div>
<div class="col-sm-6">
<div class="form-group">

1
<label>Enter Details Related To Your Order</label>
@Html.TextAreaFor(x => x.ORDER_DESCRIPTION, new {
@class = "form-control", rows = "12", @placeholder = "Enter Details That You Want
To Print" })
@Html.ValidationMessageFor(x => x.ORDER_DESCRIPTION,
"", new { @class = "text-danger" })
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Upload Design For Reference (If Any)</label>
<img class="col-sm-12" id="the_img" style="border:solid"
src="~/FrameImage.png" height="350" />
@Html.TextBoxFor(x => x.postIMAGE, new { @class = "col-sm-
12 form-control", type = "file", onchange = "show(this)" })
@Html.ValidationMessageFor(x => x.postIMAGE, "", new {
@class = "text-danger" })
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>Upload PDF Document (If Any)</label>
@Html.TextBoxFor(x => x.postPDF, new { @class = "col-sm-12
form-control", type = "file" })
@Html.ValidationMessageFor(x => x.postPDF, "", new {
@class = "text-danger" })
</div>
</div>

@*Condition to check if customer is logged in or not*@


@if (Session["CustomerId"] == null)
{
@Html.ActionLink("Login", "Login", "Customer", null, new {
@class = "btn btn-outline-info float-right" })
}
else
{
<input class="btn btn-outline-info float-right" type="submit"
value="Review Order">
}
</div>
</div>
</div>
}

BookOrder.cshtml:- (Check Out)


@model OnlinePaperWork_OPW_.Models.OrderDetailsModel @*Model*@
@{
ViewBag.Title = "Check Out"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Review order form to book the order*@


@using (Html.BeginForm("FinishBookOrder", "Customer", FormMethod.Post))
{

1
<div class="card">
<div class="card-body">
<div class="col-sm-12">
<h3>User Details</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<h5>Email Id:</h5>@Model.CUSTOMER_EMAIL_ID
</div>
<div class="form-group">
<h5>Name:</h5>@Model.CUSTOMER_NAME
</div>
<div class="form-group">
<h5>Phone No:</h5>@Model.CUSTOMER_PHONE_NO
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<h5>Delivery Address:</h5>@Model.CUSTOMER_ADDRESS
</div>
</div>
</div>
<hr />
<h3>Review Order Details</h3>
<hr />
<div class="row">
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.PRODUCT_IMAGE)" class="
card- img-top border" height="300" />
<h6>Product Image</h6>
<hr />
</div>
<div class="col-sm-7">
<br />
<h4>Product Name : @Model.PRODUCT_NAME</h4>
<br />
<h5>Corners : @Model.ORDER_CORNER_NAME</h5>
<h5>Size : @Model.ORDER_SIZE_NAME</h5>
<h5>Paper Quality : @Model.ORDER_PAPER_QUALITY_NAME</h5>
<h5>Quantity : @Model.ORDER_QUANTITY Pec</h5>
@if (Model.ORDER_PAGE_ID != null)
{
<h5>Page : @Model.ORDER_PAGE_NAME</h5>
}
</div>
</div>
<div class="row">
@if (Model.ORDER_REFERENCE_IMAGE != null)
{
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.ORDER_REFERENCE_IMAGE)"
class=" card-img-top border" height="300" />
<h6>Reference Image (If Any)</h6>
<hr />
</div>
}
<div class="col-sm-7">
<br />

1
<h5>Description:</h5>
<h5>@Model.ORDER_DESCRIPTION</h5>
</div>
</div>
@if (Model.ORDER_REFERENCE_PDF != null)
{
<div class="col-sm-12">
<h6>Reference Pdf (If Any)</h6>
<input type="button" class="btn btn-outline-info"
value="Show Pdf" onclick="window.open('@Url.Action("ShowPdf", "Customer", new {
targe = "_blank", pdfFile = Model.ORDER_REFERENCE_PDF })')" />
</div>
}
<hr />
<h3>Payment</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<h5>Finall Amount : Rs.@Model.ORDER_TOTAL_PRICE </h5>
<h6>Include All Taxes, All Service Chargers And After All
Discount</h6>
</div>
<div class="col-sm-6">
@if (Model.PRODUCT_ID_PROOF_REQUIRED == true)
{
<input class="btn btn-outline-info float-right"
type="submit" value="Book & Upload Id Proof" />
}
else
{
<input class="btn btn-outline-info float-right"
type="submit" value="Book & Make Payment" />
}
</div>
</div>
</div>
</div>
</div>
}

MyOrder.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER>
@{
ViewBag.Title = "My Order"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Details Found...</h3>
}
else
{

1
@*Table to show data*@
<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Type
</th>
<th>
Total Price
</th>
<th>
Options
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details in table*@


@foreach (var order in Model)
{
<tr>
<td>
@order.ORDER_ID
</td>
<td>
@order.tbl_PRODUCT.PRODUCT_NAME
</td>
<td>
@order.ORDER_TOTAL_PRICE
</td>
<td>
@Html.ActionLink("More", "ViewOrderDetails", new { orderId
= order.ORDER_ID }, new { @class = "btn btn-outline-info" })
@if (order.ORDER_STATUS == "Booked" || order.ORDER_STATUS
== "Waiting For Payment" || order.ORDER_STATUS == "Waiting For Id Proof")
{
@Html.ActionLink("Cancel Order", "CancelOrder", new {
orderId = order.ORDER_ID }, new { @class = "btn btn-outline-danger", onclick =
"return confirm('Are you sure you wish to cancel this order?');" })
}
</td>
</tr>
}
</tbody>
</table>
}

ViewOrderDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER @*Model*@
@{
ViewBag.Title = "Order Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

1
@*Show details of booked order*@
<div class="card">
<div class="card-body">
<div class="col-sm-12">
<h3>User Details</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<h5>Order Id:</h5>@Model.ORDER_ID
</div>
<div class="form-group">
<h5>Customer Name:</h5>@Model.tbl_CUSTOMER.CUSTOMER_NAME
</div>
<div class="form-group">
<h5>Phone No.:</h5>@Model.tbl_CUSTOMER.CUSTOMER_PHONE_NO
</div>
<div class="form-group">
<h5>Email Id:</h5>@Model.tbl_CUSTOMER.CUSTOMER_EMAIL_ID
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<h5>Delivery Address:</h5>
@Model.tbl_CUSTOMER.CUSTOMER_ADDRESS
</div>
</div>
</div>
<hr />
<h3>Review Order Details</h3>
<hr />
<div class="row">
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.tbl_PRODUCT.PRODUCT_IMAGE)"
class=" card-img-top border" height="300" />
<h6>Product Image</h6>
<hr />
</div>
<div class="col-sm-7">
<br />
<h4>Product Name : @Model.tbl_PRODUCT.PRODUCT_NAME</h4>
<br />
<h5>Corners : @Model.tbl_PRODUCT_CORNER.CORNER_NAME</h5>
<h5>Size : @Model.tbl_PRODUCT_SIZE.SIZE_NAME</h5>
<h5>Paper Quality :
@Model.tbl_PRODUCT_PAPER_QUALITY.PAPER_QUALITY_NAME</h5>
<h5>Quantity : @Model.ORDER_QUANTITY Pec</h5>
@if (Model.ORDER_PAGE_ID_FK != null)
{
<h5>Page : @Model.tbl_PRODUCT_PAGE.PAGE_NAME</h5>
}
</div>
</div>
<div class="row">
@if (Model.ORDER_REFERENCE_IMAGE != null)
{
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.ORDER_REFERENCE_IMAGE)"
class=" card-img-top border" height="300" />

1
<h6>Reference Image</h6>
<hr />
</div>
}
<div class="col-sm-7">
<br />
<h5>Description:</h5>
<h5>@Model.ORDER_DESCRIPTION</h5>
</div>
</div>
<div class="row">
@if (Model.ORDER_REFERENCE_PDF != null)
{
<div class="col-sm-12">
<h6>Reference Pdf (If Any)</h6>
<input type="button" class="btn btn-outline-info"
value="Show Pdf" onclick="window.open('@Url.Action("ShowPdf", "Customer", new {
targe = "_blank", pdfFile = Model.ORDER_REFERENCE_PDF })')" />
</div>
}
</div>
<hr />
<h3>Payment Details</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<h5>Payment Type : @Model.ORDER_PAYMENT_TYPE</h5>
<h5>Finall Amount : Rs.@Model.ORDER_TOTAL_PRICE </h5>
<h6>Include All Taxes, All Service Chargers And After All
Discount</h6>
</div>
<div class="col-sm-6">
<h5>Order Status : @Model.ORDER_STATUS</h5>
</div>
</div>
</div>
</div>
</div>

TrackOrder.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER>
@{
ViewBag.Title = "Track Order"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Details Found...</h3>
}
else
{

@*Table to show data*@

1
<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Type
</th>
<th>
Payment Type
</th>
<th>
Order Status
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details in table*@


@foreach (var order in Model)
{
<tr>
<td>
@order.ORDER_ID
</td>
<td>
@order.tbl_PRODUCT.PRODUCT_NAME
</td>
<td>
@order.ORDER_PAYMENT_TYPE
</td>
<td>
@order.ORDER_STATUS
</td>
</tr>
}
</tbody>
</table>
}

ProductForUploadIdProof.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER>
@{
ViewBag.Title = "Upload Id Proof"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Products Found For Upload Id Proof...</h3>
}
else
{

1
@*Table to show data*@
<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Type
</th>
<th>
Total Price
</th>
<th>
Options
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details in table*@


@foreach (var idProof in Model)
{
<tr>
<td>
@idProof.ORDER_ID
</td>
<td>
@idProof.tbl_PRODUCT.PRODUCT_NAME
</td>
<td>
@idProof.ORDER_TOTAL_PRICE
</td>
<td>
@Html.ActionLink("Upload Id Proof", "UploadIdProof", new {
orderId = idProof.ORDER_ID }, new { @class = "btn btn-outline-info" })
</td>
</tr>
}
</tbody>
</table>
}

UploadIdProof.cshtml:-
@model OnlinePaperWork_OPW_.Models.IdProofModel @*Model*@
@{
ViewBag.Title = "Upload Id Proof"; @*Page title*@
}

@*Customer id proof uploadint form*@


@using (Html.BeginForm("UploadIdProof", "Customer", FormMethod.Post, new { enctype
= "multipart/form-data" }))
{
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>

1
</div>
<div class="card-body">
<div class="form-group">
<label>Order Id</label>
@Html.TextBoxFor(x => x.ID_PROOF_ORDER_ID_FK, new { @class
= "form-control", @Value = ViewBag.orderIdBag, @readonly = "readonly" })
</div>
<div class="form-group">
<label>Document Type</label>
@Html.DropDownListFor(x => x.ID_PROOF_DOCUMENT_TYPE,
(IEnumerable<SelectListItem>)ViewBag.DocumentTypeBag, "----- Select -----", new {
@class = "form-control" })
@Html.ValidationMessageFor(x => x.ID_PROOF_DOCUMENT_TYPE,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Upload Image</label>
<div class="d-flex justify-content-center">
<img id="the_img" class="col-sm-10" height="250"
src="~/FrameImage.png" />
</div>
</div>
<div class="form-group">
@Html.TextBoxFor(x => x.postIMAGE, new { @class = "col-sm-
12 form-control", type = "file", onchange = "show(this)" })
@Html.ValidationMessageFor(x => x.postIMAGE, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ProductForUploadIdProof",
"Customer", null, new { @class = "btn btn-outline-warning " })
<input type="submit" class="btn btn-outline-success float-
right" value="Upload" />
</div>
</div>
</div>
</div>
</div>
}

ShowProductForPayment.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER>
@{
ViewBag.Title = "Make Payment"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Products Found For Payment...</h3>
}
else
{

@*Table to show data*@

1
<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Type
</th>
<th>
Total Price
</th>
<th>
Options
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details in table*@


@foreach (var order in Model)
{
<tr>
<td>
@order.ORDER_ID
</td>
<td>
@order.tbl_PRODUCT.PRODUCT_NAME
</td>
<td>
@order.ORDER_TOTAL_PRICE
</td>
<td>
@Html.DropDownList("Payment Option", new SelectList(new[]{
new SelectListItem { Text = "Cash On Delivery",
Value = Url.Action("ProductForPayment", "Customer", new{orderId=order.ORDER_ID,
paymentType="Cash On Delivery",}) },
new SelectListItem { Text = "Debit/Credit Card",
Value = Url.Action("ProductForPayment", "Customer",
new{orderId=order.ORDER_ID,paymentType="Debit/Credit Card"}) },
new SelectListItem { Text = "Net Banking", Value =
Url.Action("ProductForPayment", "Customer", new{orderId=order.ORDER_ID,
paymentType="Net Banking"}) },}, "Value", "Text"),
"----- Select -----", new { id = "urlFuntion", @class
= "form-control" })
</td>
</tr>
}
</tbody>
</table>
}

DebitCreditCard.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PAYMENT @*Model*@
@{
ViewBag.Title = "Debit/Credit Card Payment"; @*Page title*@
}

1
@*Form to payment through debit/credit card*@
@using (Html.BeginForm("MakePayment", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
@Html.Hidden("ORDER_ID_FK", (int)ViewBag.orderIdBag)
@Html.Hidden("PAYMENT_TYPE",
(string)ViewBag.paymentTypeNameBag)
@Html.Hidden("PAYMENT_AMOUNT",
(int)ViewBag.totalPriceBag)
<label>Name On Card</label>
@Html.TextBox("Name On Card", null, new { @class =
"form-control", @placeholder = "Name On Card" })
</div>
<div class="form-group">
<label>Card Number</label>
@Html.TextBox("Card Number", null, new { @class =
"form-control", @placeholder = "Card Number" })
</div>
<div class="form-group row">
<div class="col-sm-4">
<label>CVV</label>
@Html.TextBox("CVV", null, new { @class = "form-
control", @placeholder = "CVV" })
</div>
<div class="col-sm-4">
<label>Expiration</label>
@Html.TextBox("MM", null, new { @class = "form-
control", @placeholder = "MM" })
</div>
<div class="col-sm-4">
<label></label>
@Html.TextBox("YYYY", null, new { @class = "form-
control", @placeholder = "YYYY" })
</div>
</div>
<div class="form-group row">
<div class="col-sm-4 offset-sm-4">
<label>Pin</label>
@Html.TextBox("Pin", null, new { @class = "form-
control", @placeholder = "Pin" })
</div>
<div class="col-sm-4">
</div>
</div>
<div class="form-group">
<input type="submit" value="Amount :
Rs.@ViewBag.totalPriceBag Pay" class="btn btn-outline-success btn-block" />
</div>
</div>
</div>
</div>

1
</div>
</div>
}

NetBanking.cshtml:-
@{
ViewBag.Title = "Net Banking"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />
<h4>Service Not Available...</h4>

BillReport.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PAYMENT> @*List type
model*@ @{
ViewBag.Title = "Bill Report"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Reports Available...</h3>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Type
</th>
<th>
Total Price
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details in table*@


@foreach (var payment in Model)
{
<tr>
<td>
@payment.ORDER_ID_FK
</td>
<td>
@payment.PAYMENT_TYPE

1
</td>
<td>
@payment.PAYMENT_AMOUNT
</td>
</tr>
}
</tbody>
</table>
}

Feedback.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_FEEDBACK @*Model*@
@{
ViewBag.Title = "Feedback"; @*Page title*@
}

@*feedback submittion form*@


@using (Html.BeginForm("Feedback", "Customer", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card mt-3">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Feedback Type</label>
@Html.DropDownListFor(x => x.FEEDBACK_TYPE,
(IEnumerable<SelectListItem>)ViewBag.feedbackTypeBag, "-----Select-----", new {
@class = "form-control" })
@Html.ValidationMessageFor(x => x.FEEDBACK_TYPE, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Message</label>
@Html.TextAreaFor(x => x.FEEDBACK_MESSAGE, new {
@class = "form-control", rows = "12", @placeholder = "Message" })
@Html.ValidationMessageFor(x => x.FEEDBACK_MESSAGE,
"", new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning " })
<input type="submit" value="Sumit" class="btn btn-
outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}

1
AboutUs.cshtml:-
@{
ViewBag.Title = "About Us"; @*Page title*@
}

<h2>ONLINE PAPER WORK (OPW)</h2>


<hr />
<p>
This web based application is developed to fullfill the requirement for
submission of project report to the School of Computer and Information Sciences,
IGNOU
in partial fulfillment of the requirements for the award of the degree MASTER
OF COMPUTER APPLICATION (MCA).
</p>
<p>Year of submission: 2021-2022</p>
<div class="row">
<div class="col-sm-4">
<p>
Student Details:
<br />
Name : MANISH KUMAR GOND
<br />
Enrollment No.: 176430487
<br />
Program: MCA
</p>
</div>
<img src="~/ignou.png" class="col-sm-2" />
<img src="~/makeInIndia.jfif" class="col-sm-2" />
<img src="~/digital-india-logo.jpg" class="col-sm-2" />
<img src="~/Swachh_Bharat_logo.jpg" class="col-sm-2" />
</div>

CustomerController.cs
//importing files
using OnlinePaperWork_OPW_.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data;
using System.IO;
using System.Net.Mail;
using System.Net;

//Namespace to organize classes


namespace OnlinePaperWork_OPW_.Controllers
{

//customer class
public class CustomerController : Controller
{
//instantiating of database and model classes

1
private OnlinePaperWorkEntities db = new OnlinePaperWorkEntities();
private OrderDetailsModel orderDetailsModel = new OrderDetailsModel();

//signup action method http get


public ActionResult SignUp()
{
return View();
}

//signup action method http post


[HttpPost]
public ActionResult SignUp(tbl_CUSTOMER customer)
{

//getting customer details from database


var existingDetails = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_LOGIN_ID
== customer.CUSTOMER_LOGIN_ID || x.CUSTOMER_PHONE_NO == customer.CUSTOMER_PHONE_NO
|| x.CUSTOMER_EMAIL_ID == customer.CUSTOMER_EMAIL_ID).FirstOrDefault();

//checking if details already exist in database or not


if (existingDetails != null)
{
if (existingDetails.CUSTOMER_LOGIN_ID ==
customer.CUSTOMER_LOGIN_ID)
{
TempData["Message"] = "Login id already exist, try something
else...";
}
else if (existingDetails.CUSTOMER_PHONE_NO ==
customer.CUSTOMER_PHONE_NO)
{
TempData["Message"] = "Phone no already exist, try something
else...";
}
else
{
TempData["Message"] = "Email id already exist, try something
else...";
}
}
else
{

//adding customer details in the database


try
{
db.tbl_CUSTOMER.Add(customer);
db.SaveChanges();
TempData["Message"] = "Account Created Successfully, Please
Login...";
return RedirectToAction("Login");
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
return View(customer);
}

1
//Forgot password action method http get
public ActionResult ForgotPassword()
{
return View();
}

//Forgot password action method http post


[HttpPost]
public ActionResult ForgotPassword(tbl_CUSTOMER customer)
{

//getting customer details from database


var customerDetails = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_LOGIN_ID
== customer.CUSTOMER_LOGIN_ID).FirstOrDefault();

//checking if details is null or not


if (customerDetails != null)
{
try
{
using (MailMessage mail = new MailMessage())
{
mail.From = new
MailAddress("gondmanishkumar940@gmail.com");
mail.To.Add(customerDetails.CUSTOMER_EMAIL_ID);
mail.Subject = "Online Paper Work (OPW)";
mail.Body = "<h1>Your password is
"+customerDetails.CUSTOMER_PASSWORD+"</h1>";

using (SmtpClient smtp = new SmtpClient())


{
smtp.UseDefaultCredentials = false;
smtp.Credentials = new
NetworkCredential("gondmanishkumar940@gmail.com", "password");
smtp.EnableSsl = true;
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Send(mail);
}
TempData["Message"] = "Password Sended To Email
Successfully...";
}
}
catch (Exception)
{
ViewBag.Error = "Something Went Wrong, Please Try Again
Later...";
}
}
else
{
TempData["Message"] = "No Details Found...";
}
return View();
}
//Login action method http get
public ActionResult Login()
{
}

1
return View();

1
//Login action method http post
[HttpPost]
public ActionResult Login(tbl_CUSTOMER customer)
{
try
{
//getting customer details from database
var cutomerValidity = db.tbl_CUSTOMER.Where(x =>
x.CUSTOMER_LOGIN_ID == customer.CUSTOMER_LOGIN_ID && x.CUSTOMER_PASSWORD ==
customer.CUSTOMER_PASSWORD).FirstOrDefault();

//checking if details is null or not


if (cutomerValidity != null)
{

//creating session for customer


Session["CustomerId"] =
cutomerValidity.CUSTOMER_ID.ToString();
Session["CustomerName"]
= cutomerValidity.CUSTOMER_NAME.ToString();
return RedirectToAction("Home");
}
else
{
TempData["Message"] = "Wrong User Id or Password...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return View();
}

//Profile action method http get


public new ActionResult Profile()
{

//converting customer id into integer


var customerId = Convert.ToInt32(Session["CustomerId"]);

//getting details form database using customer id and sending to view


var customerData = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_ID ==
customerId).FirstOrDefault();
customerData.CUSTOMER_CONFIRM_PASSWORD =
customerData.CUSTOMER_PASSWORD;
return View(customerData);
}

//Profile action method http post


[HttpPost]
public new ActionResult Profile(tbl_CUSTOMER customer)
{

//converting customer id into integer


var customerSession = Convert.ToInt32(Session["customerId"]);

//getting details form database using customer id

1
var existingDetails = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_PHONE_NO
== customer.CUSTOMER_PHONE_NO || x.CUSTOMER_EMAIL_ID ==
customer.CUSTOMER_EMAIL_ID).Where(y => y.CUSTOMER_ID !=
customerSession).FirstOrDefault();

//checking if details already exist in database


if (existingDetails != null)
{
if (existingDetails.CUSTOMER_PHONE_NO ==
customer.CUSTOMER_PHONE_NO)
{
TempData["Message"] = "Phone no already exist, try something
else...";
}
else
{
TempData["Message"] = "Email id already exist, try something
else...";
}
}
else
{
try
{
//updating details in the database
var customerDetails = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_ID
== customer.CUSTOMER_ID).FirstOrDefault();
customerDetails.CUSTOMER_PASSWORD =
customer.CUSTOMER_PASSWORD;
customerDetails.CUSTOMER_CONFIRM_PASSWORD =
customer.CUSTOMER_CONFIRM_PASSWORD;
customerDetails.CUSTOMER_NAME = customer.CUSTOMER_NAME;
customerDetails.CUSTOMER_PHONE_NO =
customer.CUSTOMER_PHONE_NO;
customerDetails.CUSTOMER_EMAIL_ID =
customer.CUSTOMER_EMAIL_ID;
customerDetails.CUSTOMER_ADDRESS = customer.CUSTOMER_ADDRESS;
db.Entry(customerDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Details Has Been Updated, Please Re-
Login Once...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
return View(customer);
}

//Logout action method http get


public ActionResult Logout()
{

//destoring session
Session.Clear();
Session.Abandon();
return RedirectToAction("Home");
}

1
//Search product action method http get
public ActionResult SearchProduct(string searchParameter)
{

//searching product details in database


return View(db.tbl_PRODUCT.Where(x =>
x.PRODUCT_NAME.Contains(searchParameter)));
}
//Home action method http get
public ActionResult Home()
{

//creating list of category details and sending list of product to the view
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categorylistBag = categoryList;
return View(db.tbl_PRODUCT.OrderBy(x =>
x.PRODUCT_CATEGORY_ID_FK).ToList());
}

//Category action method http get


public ActionResult Category()
{

//seding list of cateogries to the view


return View(db.tbl_CATEGORY.ToList());
}

//Products of a singal category action method http get


public ActionResult CategoryProduct(int categoryId)
{

//getting details of singal category from database using categoryid and sending
all product of that category
tbl_CATEGORY category = db.tbl_CATEGORY.Where(x => x.CATEGORY_ID ==
categoryId).FirstOrDefault();
ViewBag.categoryNameBag = category.CATEGORY_NAME.ToString();

return View(db.tbl_PRODUCT.Where(x => x.PRODUCT_CATEGORY_ID_FK ==


categoryId).ToList());
}

//Single product details action method http get


public ActionResult ProductDetails(int productId, int categoryId)
{

//getting singal details of product and sending to view


var productDetails = db.tbl_PRODUCT.Where(x => x.PRODUCT_ID ==
productId).FirstOrDefault();
orderDetailsModel.PRODUCT_ID = productDetails.PRODUCT_ID;
orderDetailsModel.PRODUCT_NAME = productDetails.PRODUCT_NAME;
orderDetailsModel.PRODUCT_PRICE = productDetails.PRODUCT_PRICE;
orderDetailsModel.PRODUCT_QUANTITY = productDetails.PRODUCT_QUANTITY;
orderDetailsModel.PRODUCT_DESCRIPTION =
productDetails.PRODUCT_DESCRIPTION;
orderDetailsModel.PRODUCT_IMAGE = productDetails.PRODUCT_IMAGE;
orderDetailsModel.PRODUCT_PAGE_DESIGN_REQUIRED =
productDetails.PRODUCT_PAGE_DESIGN_REQUIRED;

1
//creating list of corners,paper quality,size and page details
ViewBag.cornerDetailsBag = new
SelectList(db.tbl_PRODUCT_CORNER.Where(x => x.CORNER_CATEGORY_ID_FK ==
categoryId), "CORNER_ID", "CORNER_NAME");
ViewBag.paperQualityDetailsBag = new
SelectList(db.tbl_PRODUCT_PAPER_QUALITY.Where(x => x.PAPER_QUALITY_CATEGORY_ID_FK
== categoryId), "PAPER_QUALITY_ID", "PAPER_QUALITY_NAME");
ViewBag.sizeDetailsBag = new SelectList(db.tbl_PRODUCT_SIZE.Where(x =>
x.SIZE_CATEGORY_ID_FK == categoryId), "SIZE_ID", "SIZE_NAME");
ViewBag.pageDetailsBag = new SelectList(db.tbl_PRODUCT_PAGE.Where(x =>
x.PAGE_CATEGORY_ID_FK == categoryId), "PAGE_ID", "PAGE_NAME");

return View(orderDetailsModel);
}

//Book order action method


public ActionResult BookOrder(OrderDetailsModel order, HttpPostedFileBase
postIMAGE, HttpPostedFileBase postPDF)
{
//checing if customer is logged in or not
if (Session["CustomerId"] == null)
{
TempData["Message"] = "Please Login First...";
return RedirectToAction("Login");
}
else
{
//saving all details to review before booking order
var customerId = Convert.ToInt32(Session["CustomerId"]);
var userDetails = db.tbl_CUSTOMER.Where(x => x.CUSTOMER_ID ==
customerId).FirstOrDefault();
orderDetailsModel.CUSTOMER_ID = userDetails.CUSTOMER_ID;
orderDetailsModel.CUSTOMER_NAME = userDetails.CUSTOMER_NAME;
orderDetailsModel.CUSTOMER_PHONE_NO =
userDetails.CUSTOMER_PHONE_NO;
orderDetailsModel.CUSTOMER_EMAIL_ID =
userDetails.CUSTOMER_EMAIL_ID;
orderDetailsModel.CUSTOMER_ADDRESS = userDetails.CUSTOMER_ADDRESS;

var productDetails = db.tbl_PRODUCT.Where(x => x.PRODUCT_ID ==


order.PRODUCT_ID).FirstOrDefault();
orderDetailsModel.PRODUCT_ID = productDetails.PRODUCT_ID;
orderDetailsModel.PRODUCT_NAME = productDetails.PRODUCT_NAME;
orderDetailsModel.PRODUCT_IMAGE = productDetails.PRODUCT_IMAGE;
orderDetailsModel.ORDER_QUANTITY =
productDetails.PRODUCT_QUANTITY;
orderDetailsModel.PRODUCT_PRICE = productDetails.PRODUCT_PRICE;
orderDetailsModel.PRODUCT_ID_PROOF_REQUIRED =
productDetails.PRODUCT_ID_PROOF_REQUIRED;
orderDetailsModel.ORDER_REFERENCE_IMAGE =
UploadImageFile(postIMAGE);
orderDetailsModel.ORDER_REFERENCE_PDF = UploadPdfFile(postPDF);

try
{
orderDetailsModel.ORDER_CORNER_ID = order.ORDER_CORNER_ID;
orderDetailsModel.ORDER_PAPER_QUALITY_ID =
order.ORDER_PAPER_QUALITY_ID;
orderDetailsModel.ORDER_SIZE_ID = order.ORDER_SIZE_ID;

1
tbl_PRODUCT_CORNER cornerDetails =
db.tbl_PRODUCT_CORNER.Where(x => x.CORNER_ID ==
order.ORDER_CORNER_ID).FirstOrDefault();
orderDetailsModel.ORDER_CORNER_NAME =
cornerDetails.CORNER_NAME;

tbl_PRODUCT_PAPER_QUALITY paperQualityDetails =
db.tbl_PRODUCT_PAPER_QUALITY.Where(x => x.PAPER_QUALITY_ID ==
order.ORDER_PAPER_QUALITY_ID).FirstOrDefault();
orderDetailsModel.ORDER_PAPER_QUALITY_NAME =
paperQualityDetails.PAPER_QUALITY_NAME;

tbl_PRODUCT_SIZE sizeDetails = db.tbl_PRODUCT_SIZE.Where(x =>


x.SIZE_ID == order.ORDER_SIZE_ID).FirstOrDefault();
orderDetailsModel.ORDER_SIZE_NAME = sizeDetails.SIZE_NAME;

if (order.ORDER_PAGE_ID != null)
{
tbl_PRODUCT_PAGE pageDetails = db.tbl_PRODUCT_PAGE.Where(x
=> x.PAGE_ID == order.ORDER_PAGE_ID).FirstOrDefault();
orderDetailsModel.ORDER_PAGE_NAME = pageDetails.PAGE_NAME;
}

orderDetailsModel.ORDER_QUANTITY =
productDetails.PRODUCT_QUANTITY * order.ORDER_QUANTITY;
orderDetailsModel.ORDER_DESCRIPTION = order.ORDER_DESCRIPTION;

orderDetailsModel.ORDER_TOTAL_PRICE =
productDetails.PRODUCT_PRICE * order.ORDER_QUANTITY;

TempData["checkOutDetails"] = orderDetailsModel;
return View(orderDetailsModel);
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}

return RedirectToAction("ProductDetails", new { productId =


productDetails.PRODUCT_ID, categoryId = productDetails.PRODUCT_CATEGORY_ID_FK });
}
}

//Finish order booking action method


public ActionResult FinishBookOrder()
{
//saving all details to book order
orderDetailsModel = TempData["checkOutDetails"] as OrderDetailsModel;
tbl_PRINT_JOB_ORDER printJobOrder = new tbl_PRINT_JOB_ORDER();
try
{
printJobOrder.ORDER_PRODUCT_ID_FK = orderDetailsModel.PRODUCT_ID;
printJobOrder.ORDER_CUSTOMER_ID_FK =
orderDetailsModel.CUSTOMER_ID;
printJobOrder.ORDER_CORNER_ID_FK =
orderDetailsModel.ORDER_CORNER_ID;
printJobOrder.ORDER_PAPER_QUALITY_ID_FK =
orderDetailsModel.ORDER_PAPER_QUALITY_ID;

1
printJobOrder.ORDER_SIZE_ID_FK = orderDetailsModel.ORDER_SIZE_ID;
printJobOrder.ORDER_QUANTITY = orderDetailsModel.ORDER_QUANTITY;
printJobOrder.ORDER_PAGE_ID_FK = orderDetailsModel.ORDER_PAGE_ID;
printJobOrder.ORDER_REFERENCE_IMAGE =
orderDetailsModel.ORDER_REFERENCE_IMAGE;
printJobOrder.ORDER_REFERENCE_PDF =
orderDetailsModel.ORDER_REFERENCE_PDF;
printJobOrder.ORDER_TOTAL_PRICE =
orderDetailsModel.ORDER_TOTAL_PRICE;
printJobOrder.ORDER_PAYMENT_TYPE = "Payment Not Made";
if (orderDetailsModel.PRODUCT_ID_PROOF_REQUIRED ==
true)
{
printJobOrder.ORDER_STATUS = "Waiting For Id Proof";
}
else
{
printJobOrder.ORDER_STATUS = "Waiting For Payment";
}
printJobOrder.ORDER_DESCRIPTION =
orderDetailsModel.ORDER_DESCRIPTION;
db.tbl_PRINT_JOB_ORDER.Add(printJobOrder);
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Order Has Been Booked, Thankyou...";

if (orderDetailsModel.PRODUCT_ID_PROOF_REQUIRED == true)
{
return RedirectToAction("ProductForUploadIdProof");
}
else
{
return RedirectToAction("ShowProductForPayment");
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("Home");
}

//Booked orders action method


public ActionResult MyOrder()
{

//getting customer id using session and convering into integer


int customerId = Convert.ToInt32(Session["CustomerId"]);

//sending all booked order details to view using customer id from database
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_CUSTOMER_ID_FK
== customerId).ToList().OrderByDescending(y => y.ORDER_ID));
}

//View booked order details action method


public ActionResult ViewOrderDetails(int orderId)
{

//sending singal booked order details to view using order id from database

1
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
orderId).FirstOrDefault());
}

//Cancel booked order details action method


public ActionResult CancelOrder(int orderId)
{
try
{
//cancelling booked order using order id
var orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
orderId).FirstOrDefault();
orderDetails.ORDER_STATUS = "Canceled";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Order Canceled Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("MyOrder");
}

//Track orders action method


public ActionResult TrackOrder()
{
//sending booked order details from database to view using customer id
int customerId = Convert.ToInt32(Session["CustomerId"]);
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_CUSTOMER_ID_FK
== customerId).ToList().OrderByDescending(y => y.ORDER_ID));
}

//product details for upload id proof action method


public ActionResult ProductForUploadIdProof()
{
//sending order details which is waiting for id proof from database to view using
customer id
int customerId = Convert.ToInt32(Session["CustomerId"]);
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_CUSTOMER_ID_FK
== customerId && x.ORDER_STATUS == "Waiting For Id
Proof").ToList().OrderByDescending(y => y.ORDER_ID));
}

//Upload id proof action method http get


public ActionResult UploadIdProof(int orderId)
{
//sending order details which is waiting for id proof from database to view using
order id
tbl_PRINT_JOB_ORDER orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x =>
x.ORDER_ID == orderId && x.ORDER_STATUS == "Waiting For Id
Proof").FirstOrDefault();
ViewBag.orderIdBag = orderDetails.ORDER_ID;

//creating list of document types


List<SelectListItem> DocumentType = new List<SelectListItem>();
DocumentType.Add(new SelectListItem { Text = "Aadhar Card", Value =
"Aadhar Card" });

1
DocumentType.Add(new SelectListItem { Text = "Pan Card", Value = "Pan
Card" });
DocumentType.Add(new SelectListItem { Text = "Driving Licence", Value
= "Driving Licence" });
ViewBag.DocumentTypeBag = DocumentType;
return View();
}

//Upload id proof action method http post


[HttpPost]
public ActionResult UploadIdProof(IdProofModel idProof, HttpPostedFileBase
postIMAGE)
{

//calling uploadImageFile function to check image validation


string idProofImage = UploadImageFile(postIMAGE);
if (idProofImage == null)
{
TempData["Message"] = "Please Upload Id Proof Image Of Jpg Or Jpeg
File Formet...";
}
else
{
try
{

//saving id proof details and updating booked order details


var idProofDetails = new tbl_ID_PROOF();
idProofDetails.ID_PROOF_CUSTOMER_ID_FK =
Convert.ToInt32(Session["CustomerId"]);
idProofDetails.ID_PROOF_ORDER_ID_FK =
idProof.ID_PROOF_ORDER_ID_FK;
idProofDetails.ID_PROOF_DOCUMENT_TYPE =
idProof.ID_PROOF_DOCUMENT_TYPE;
idProofDetails.ID_PROOF_IMAGE = idProofImage;
db.tbl_ID_PROOF.Add(idProofDetails);

tbl_PRINT_JOB_ORDER orderDetails =
db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
idProof.ID_PROOF_ORDER_ID_FK).FirstOrDefault();
orderDetails.ORDER_STATUS = "Waiting For Approving Id Proof";
db.Entry(orderDetails).State = EntityState.Modified;

db.SaveChanges();
TempData["Message"] = "Id Proof Uploaded Successfully...";
return RedirectToAction("TrackOrder");
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
ViewBag.orderIdBag = idProof.ID_PROOF_ORDER_ID_FK;
return RedirectToAction("UploadIdProof", new { orderId
=
idProof.ID_PROOF_ORDER_ID_FK });
}

//Product details for payment action method


public ActionResult ShowProductForPayment()

1
{
//sending order details which is waiting for payment
int customerId = Convert.ToInt32(Session["CustomerId"]);
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_CUSTOMER_ID_FK
== customerId && x.ORDER_STATUS == "Waiting For
Payment").ToList().OrderByDescending(y => y.ORDER_ID));
}

//Payment action method http get


public ActionResult ProductForPayment(int orderId, string paymentType)
{
//saving payment details if cash on delivery
if (paymentType == "Cash On Delivery")
{
try
{
tbl_PRINT_JOB_ORDER orderDetails =
db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID == orderId).FirstOrDefault();
orderDetails.ORDER_PAYMENT_TYPE = paymentType;
orderDetails.ORDER_STATUS = "Booked";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Payment Type Recorded Successfull...";
return RedirectToAction("MyOrder");
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}

//sending to debit/credit card payment page


else if (paymentType == "Debit/Credit Card")
{
return RedirectToAction("DebitCreditCard", new { orderId,
paymentType });
}

//sending to net banking payment page


else if (paymentType == "Net Banking")
{
TempData["Message"] = "Payment Type Not Available...";
return RedirectToAction("NetBanking", new { orderId, paymentType
});
}
else
{
TempData["Message"] = "Error, Try Again...";
}
return RedirectToAction("ProductForPayment");
}

//Payment by debit/credit card action method


public ActionResult DebitCreditCard(int orderId, string paymentType)
{
//sending order details to the view from database
ViewBag.orderIdBag = orderId;
ViewBag.paymentTypeNameBag = paymentType;

1
tbl_PRINT_JOB_ORDER orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x =>
x.ORDER_ID == orderId).SingleOrDefault();
ViewBag.totalPriceBag = orderDetails.ORDER_TOTAL_PRICE;
return View();
}

//Payment by net banking action method


public ActionResult NetBanking(int orderId, string paymentType)
{
return View();
}

//Finish payment action method


public ActionResult MakePayment(tbl_PAYMENT payment)
{
//saving payment details
try
{
var paymentDetails = new tbl_PAYMENT();
payment.ORDER_ID_FK = payment.ORDER_ID_FK;
payment.PAYMENT_TYPE = payment.PAYMENT_TYPE;
payment.PAYMENT_AMOUNT = payment.PAYMENT_AMOUNT;
db.tbl_PAYMENT.Add(payment);

tbl_PRINT_JOB_ORDER orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x


=> x.ORDER_ID == payment.ORDER_ID_FK).FirstOrDefault();
orderDetails.ORDER_PAYMENT_TYPE = payment.PAYMENT_TYPE;
orderDetails.ORDER_STATUS = "Booked";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Payment Done...";
return RedirectToAction("MyOrder");
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowProductForPayment");
}

//Payment bill reports action method


public ActionResult BillReport()
{
//sending all payment details to view from database
int customerId = Convert.ToInt32(Session["CustomerId"]);
return View(db.tbl_PAYMENT.Where(x =>
x.tbl_PRINT_JOB_ORDER.ORDER_CUSTOMER_ID_FK ==
customerId).ToList().OrderByDescending(y => y.ORDER_ID_FK));
}

//Feedback action method http get


public ActionResult Feedback()
{

//creating of list of feedback types


List<SelectListItem> feedbackTypeList = new List<SelectListItem>();
feedbackTypeList.Add(new SelectListItem { Text = "Product", Value =
"Product", });

1
feedbackTypeList.Add(new SelectListItem { Text = "Category", Value =
"Category", });
feedbackTypeList.Add(new SelectListItem { Text = "Payment", Value =
"Payment", });
feedbackTypeList.Add(new SelectListItem { Text = "Service", Value =
"Service", });
feedbackTypeList.Add(new SelectListItem { Text = "Other", Value =
"Other", });
ViewBag.feedbackTypeBag = feedbackTypeList;
return View();
}

//Feedback action method http post


[HttpPost]
public ActionResult Feedback(tbl_FEEDBACK feedback)
{
//saving feedback details
try
{
int customerId = Convert.ToInt32(Session["CustomerId"]);
feedback.FEEDBACK_CUSTOMER_ID_FK = customerId;
db.tbl_FEEDBACK.Add(feedback);
db.SaveChanges();
TempData["Message"] = "Feedback Submited Successfully, Thankyou
For Your Feedback...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("Feedback");
}
public ActionResult AboutUs()
{
return View();
}

//Upload image file function


public string UploadImageFile(HttpPostedFileBase imageFile)
{
string path = null;
if (imageFile != null)
{
var name = Path.GetFileNameWithoutExtension(imageFile.FileName);
var ext = Path.GetExtension(imageFile.FileName);
try
{
string myfile = name + "_" +
DateTime.Now.ToString("dd_MM_yyyy_hh_mm_tt") + ext;
path = Path.Combine(Server.MapPath("~/images/"), myfile);
imageFile.SaveAs(path);
path = "~/images/" + myfile;
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
return path;

1
}

//Upload pdf file function


public string UploadPdfFile(HttpPostedFileBase pdfFile)
{
string path = null;
if (pdfFile != null)
{
var name = Path.GetFileNameWithoutExtension(pdfFile.FileName);
var ext = Path.GetExtension(pdfFile.FileName);
try
{
string myfile = name + "_" +
DateTime.Now.ToString("dd_MM_yyyy_hh_mm_tt") + ext;
path = Path.Combine(Server.MapPath("~/pdf/"), myfile);
pdfFile.SaveAs(path);

path = "~/pdf/" + myfile;


}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
return path;
}
public FileResult ShowPdf(string pdfFile)
{
string ReportURL =
System.Web.HttpContext.Current.Server.MapPath(pdfFile);
byte[] FileBytes = System.IO.File.ReadAllBytes(ReportURL);
return File(FileBytes, "application/pdf");
}

}
}

_LayoutAdministrator.cshtml:-
<!DOCTYPE html> @*Doctype tag*@
<html> @*Html tag*@
<head> @*Head tag*@
<title>@ViewBag.Title - Online Paper Work(OPW)</title> @*title tag*@

@*Including CDN (content delivery network) links*@


<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></
script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script
>

@*Including bundle config*@


@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")

1
</head> @*Head closing tag*@
<body class="bg-light"> @*Body tag*@
<div class="d-flex p-2 bg-info text-white">
<b>ONLINE PAPER WORK (OPW)</b>
</div>

@*Navigation bar button and links*@


<nav class="navbar navbar-expand-lg navbar-dark bg-dark">

@*Checking session of admin*@


@if (Session["AdminId"] == null)
{
@Html.ActionLink("Home", "Home", "Customer", null, new { @class
= "navbar-brand" })
}
else
{
@Html.ActionLink("Home", "ShowCategory", "Administrator", null, new {
@class = "navbar-brand" })
<button class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">@Html.ActionLink("Categories/Products",
"ShowCategory", "Administrator", null, new { @class = "nav-link" })</li>
<li class="nav-item">@Html.ActionLink("Printing Orders",
"ShowPrintingOrder", "Administrator", null, new { @class = "nav-link" })</li>
<li class="nav-item">@Html.ActionLink("ID Proof Details",
"ShowIdProof", "Administrator", null, new { @class = "nav-link" })</li>
<li class="nav-item">@Html.ActionLink("Payment Details",
"ShowPaymentDetails", "Administrator", null, new { @class = "nav-link" })</li>
<li class="nav-item">@Html.ActionLink("Feedback Details",
"ShowFeedbackDetails", "Administrator", null, new { @class = "nav-link" })</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#"
id="navbarDropdownSpecifications" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
Specifications
</a>
<ul class="dropdown-menu" aria-
labelledby="navbarDropdownSpecifications">
<li>@Html.ActionLink("Corner Details",
"ShowCornerDetails", "ProductSpecification", null, new { @class = "dropdown-item"
})</li>
<li>@Html.ActionLink("Paper Quality Details",
"ShowPaperQualityDetails", "ProductSpecification", null, new { @class = "dropdown-
item" })</li>
<li>@Html.ActionLink("Size Details",
"ShowSizeDetails", "ProductSpecification", null, new { @class = "dropdown-item"
})</li>
@*<li>@Html.ActionLink("Quantity Details",
"ShowQuantityDetails", "ProductSpecification", null, new { @class = "dropdown-
item" })</li>*@

1
<li>@Html.ActionLink("Page Details",
"ShowPageDetails", "ProductSpecification", null, new { @class = "dropdown-item"
})</li>

</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#"
id="navbarDropdownUtility" role="button" data-toggle="dropdown" aria-
haspopup="true" aria-expanded="false">
Utility
</a>
<ul class="dropdown-menu" aria-
labelledby="navbarDropdownUtility">
<li>@Html.ActionLink("Raw Material Details",
"ShowRawMaterialDetails", "Utility", null, new { @class = "dropdown-item" })</li>
<li>@Html.ActionLink("Supplier Details",
"ShowSupplierDetails", "Utility", null, new { @class = "dropdown-item" })</li>
<li>@Html.ActionLink("Staff Details",
"ShowStaffDetails", "Utility", null, new { @class = "dropdown-item" })</li>
</ul>
</li>
</ul>

@*Checking session of admin for login and logout*@


<div class="navbar-nav">
<div class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" href="#"
id="navbarDropdownAdmin" role="button" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
@Session["UserName"]
</a>
<div class="dropdown-menu" aria-
labelledby="navbarDropdownAdmin">
@Html.ActionLink("Logout", "Logout", "Administrator",
null, new { @class = "dropdown-item" })
</div>
</div>
</div>
</div>
}
</nav>

@*Render body section*@


<div class="container body-content">
<div class="loader"></div>

@*Page onload message*@


@if (TempData["Message"] != null)
{
<script type="text/javascript">
window.onload = function () {
alert('@TempData["Message"]');
return false;
};
</script>
}
<br />

1
@*Render body*@
@RenderBody()
<hr />

@*Footer*@
<footer>
<p>Online Paper Work(OPW)</p>
</footer>
</div>

@*Bootstrap bundle config link*@


@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)

</body> @*Body tag closing*@


</html> @*Html tag closing*@

Administrator Login.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_ADMINISTRATOR @*Model*@

@{
ViewBag.Title = "Administrator Login"; @*Page title*@
}

@*Admin login form*@


@using (Html.BeginForm("Login", "Administrator", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-5 ">
<div class="card">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Login Id</label>
@Html.TextBoxFor(x => x.ADMIN_LOGIN_ID, new { @class
= "form-control", @placeholder = "Login Id" })
@Html.ValidationMessageFor(x => x.ADMIN_LOGIN_ID, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Password</label>
@Html.PasswordFor(x => x.ADMIN_PASSWORD, new { @class
= "form-control", @placeholder = "Password" })
@Html.ValidationMessageFor(x => x.ADMIN_PASSWORD, "",
new { @class = "text-danger" })
</div>
<div class="form-group row">
<div class="col-sm-12">
@Html.ActionLink("Back", "Home", "Customer", null,
new { @class = "btn btn-outline-warning " })

1
<input type="submit" value="Login" class="btn btn-
outline-primary float-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}

ShowCategory.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_CATEGORY> @*List type
model*@ @{
ViewBag.Title = "Category"; @*Page title*@
}
<h4>
@ViewBag.Title

@*Button for add category and product*@


@Html.ActionLink("Add Product", "AddProduct", null, new { @class = "btn btn-
outline-primary float-right" })
@Html.ActionLink("Add Category", "AddCategory", null, new { @class = "btn btn-
outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h3>No Records Found...</h3>
}
else
{
<div class="row">

@*For each loop to show categoies details*@


@foreach (var category in Model)
{
<div class="col-sm-4 mt-3 d-flex justify-content-center">
<div class="card text-center" style="width: 21rem;">
<a href="@Url.Action("ShowProduct", "Administrator", new {
categoryId = category.CATEGORY_ID })">
<img
src="@Url.Content(category.CATEGORY_IMAGE)" class="card-img-top"
height="250" />
<div class="card-body">
<h4>@category.CATEGORY_NAME</h4>
@Html.ActionLink("Update", "UpdateCategory", new {
categoryId = category.CATEGORY_ID }, new { @class = "btn btn-outline-primary" })
@Html.ActionLink("Delete", "DeleteCategory", new {
categoryId = category.CATEGORY_ID }, new { @class = "btn btn-outline-danger",
onclick = "return confirm('Are you sure you wish to delete this category?');" })
</div>
</a>
</div>
</div>

1
}
</div>
}

AddCategory.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_CATEGORY @*Model*@
@{
ViewBag.Title = "Add Category"; @*Page title*@
}

@*Add category form*@


@using (Html.BeginForm("AddCategory", "Administrator", FormMethod.Post, new {
enctype = "multipart/form-data" }))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.TextBoxFor(x => x.CATEGORY_NAME, new { @class
= "form-control", @placeholder = "Category Name" })
@Html.ValidationMessageFor(x => x.CATEGORY_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Select Image</label>
<div class="d-flex justify-content-center">
<img id="the_img" class="col-sm-10" height="250"
src="~/FrameImage.png" />
</div>
</div>
<div class="form-group">
<input type="file" class="form-control-file "
id="file" name="file" onchange="show(this)" required />
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowCategory",
"Administrator", null, new { @class = "btn btn-outline-warning " })
<input type="submit" class="btn btn-outline-success
float-right" value="Create" />
</div>
</div>
</div>
</div>
</div>
</div>
}

UpdateCategory.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_CATEGORY @*Model*@

1
@{
ViewBag.Title = "Update Category"; @*Page title*@
}

@*Update category from*@


@using (Html.BeginForm("UpdateCategory", "Administrator", FormMethod.Post, new {
enctype = "multipart/form-data" }))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
@Html.HiddenFor(x => x.CATEGORY_ID)
<label>Category Name</label>
@Html.TextBoxFor(x => x.CATEGORY_NAME, new { @class
= "form-control", @placeholder = "Category Name" })
@Html.ValidationMessageFor(x => x.CATEGORY_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Select Image</label>
<img id="the_img" class="justify-content-center col-
sm-12" height="250" src="@Url.Content(Model.CATEGORY_IMAGE)" />
</div>
<div class="form-group">
<input type="file" class="form-control-file"
value="hghghg" id="file" name="file" onchange="show(this)" required/>
</div>
<hr />
<div class="form-group">
@Html.ActionLink("Cancel", "ShowCategory",
"Administrator", null, new { @class = "btn btn-outline-danger" })
<input type="submit" class="btn btn-outline-success
float-right" value="Update" id='theFile' onclick="initialize()" />
</div>
</div>
</div>
</div>
</div>
</div>
}

ShowProduct.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT> @*List type
model*@ @{
ViewBag.Title = "Product"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@

1
@if (Model.Count() == 0)
{
<h3>No Records Found....</h3>
}
else
{
<div class="row">

@*Foreach loop to show product details*@


@foreach (var product in Model)
{
<div class="col-sm-4 mt-3 d-flex justify-content-center">
<div class="card text-center" style="width: 18rem;">
<img src="@Url.Content(product.PRODUCT_IMAGE)" class="card-
img-top" height="250" />
<div class="card-body">
<h5>@product.PRODUCT_NAME</h5>
<h6>Price : Rs.@product.PRODUCT_PRICE</h6>
<h6>Quantity: @product.PRODUCT_QUANTITY pec</h6>
@Html.ActionLink("Update", "UpdateProduct", new {
productId = product.PRODUCT_ID, categoryId = product.PRODUCT_CATEGORY_ID_FK }, new
{ @class = "btn btn-outline-primary" })
@Html.ActionLink("Delete", "DeleteProduct", new {
productId = product.PRODUCT_ID, categoryId = product.PRODUCT_CATEGORY_ID_FK }, new
{ @class = "btn btn-outline-danger", onclick = "return confirm('Are you sure you
wish to delete this product?');" })
</div>
</div>
</div>
}
</div>
}

AddProduct.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT @*Model*@
@{
ViewBag.Title = "Add Product"; @*Page title*@
}

@*Add product form*@


@using (Html.BeginForm("AddProduct", "Administrator", FormMethod.Post, new {
enctype = "multipart/form-data" }))
{
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h4>@ViewBag.Title</h4>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x => x.PRODUCT_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.PRODUCT_CATEGORY_ID_FK,
"", new { @class = "text-danger" })
</div>

1
<div class="form-group">
<label>Product Name</label>
@Html.TextBoxFor(x => x.PRODUCT_NAME, new { @class
= "form-control", @placeholder = "Product Name" })
@Html.ValidationMessageFor(x => x.PRODUCT_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
<label>Product Price</label>
@Html.TextBoxFor(x => x.PRODUCT_PRICE, new { @class =
"form-control", @placeholder = "Product Price" })
@Html.ValidationMessageFor(x => x.PRODUCT_PRICE, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
<label>Product Quantity</label>
@Html.TextBoxFor(x => x.PRODUCT_QUANTITY, new { @class
= "form-control", @placeholder = "Product Quantity" })
@Html.ValidationMessageFor(x => x.PRODUCT_QUANTITY, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Page Designing Required</label>
@Html.DropDownListFor(x => x.PRODUCT_PAGE_DESIGN_REQUIRED,
(IEnumerable<SelectListItem>)ViewBag.YesNoListBag, null, new { @class = "form-
control" })
@Html.ValidationMessageFor(x =>
x.PRODUCT_PAGE_DESIGN_REQUIRED, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Id Proof Required</label>
@Html.DropDownListFor(x =>
x.PRODUCT_ID_PROOF_REQUIRED,
(IEnumerable<SelectListItem>)ViewBag.YesNoListBag, null, new { @class = "form-
control" })
@Html.ValidationMessageFor(x =>
x.PRODUCT_ID_PROOF_REQUIRED, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Product Description</label>
@Html.TextAreaFor(x => x.PRODUCT_DESCRIPTION, new { @class
= "form-control", @placeholder = "Product Description" })
@Html.ValidationMessageFor(x => x.PRODUCT_DESCRIPTION, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Select Image</label>
<div class="d-flex justify-content-center">
<img id="the_img" class="col-sm-10" height="250"
src="~/FrameImage.png" />
</div>
</div>
<div class="form-group">
<input type="file" class="form-control-file " id="file"
name="file" onchange="show(this)" required />
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowCategory", "Administrator",
null, new { @class = "btn btn-outline-warning " })

1
<input type="submit" class="btn btn-outline-success float-
right" value="Create" />
</div>
</div>
</div>
</div>
</div>
}

UpdateProduct.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT @*Model*@
@{
ViewBag.Title = "Update Product"; @*Page title*@
}

@*Update product details form*@


@using (Html.BeginForm("UpdateProduct", "Administrator", FormMethod.Post, new {
enctype = "multipart/form-data" }))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
@Html.HiddenFor(x =>
x.PRODUCT_ID)
<label>Category Name</label>
@Html.DropDownListFor(x => x.PRODUCT_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x =>
x.PRODUCT_CATEGORY_ID_FK, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Product Name</label>
@Html.TextBoxFor(x => x.PRODUCT_NAME, new { @class =
"form-control", @placeholder = "Product Name" })
@Html.ValidationMessageFor(x => x.PRODUCT_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Product Price</label>
@Html.TextBoxFor(x => x.PRODUCT_PRICE, new { @class
= "form-control", @placeholder = "Product Price" })
@Html.ValidationMessageFor(x => x.PRODUCT_PRICE, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Product Quantity</label>
@Html.TextBoxFor(x => x.PRODUCT_QUANTITY, new { @class
= "form-control", @placeholder = "Product Quantity" })
@Html.ValidationMessageFor(x => x.PRODUCT_QUANTITY,
"", new { @class = "text-danger" })
</div>
<div class="form-group">

1
<label>Page Designing Required</label>
@Html.DropDownListFor(x =>
x.PRODUCT_PAGE_DESIGN_REQUIRED, (IEnumerable<SelectListItem>)ViewBag.YesNoListBag,
new { @class = "form-control" })
@Html.ValidationMessageFor(x =>
x.PRODUCT_PAGE_DESIGN_REQUIRED, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Id Proof Required</label>
@Html.DropDownListFor(x =>
x. PRODUCT_ID_PROOF_REQUIRED, (IEnumerable<SelectListItem>)ViewBag.YesNoListBag,
new { @class = "form-control" })
@Html.ValidationMessageFor(x =>
x.PRODUCT_ID_PROOF_REQUIRED, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Product Description</label>
@Html.TextAreaFor(x => x.PRODUCT_DESCRIPTION, new {
@class = "form-control", @placeholder = "Product Description" })
@Html.ValidationMessageFor(x => x.PRODUCT_DESCRIPTION,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Select Image</label>
<img id="the_img" class="col-sm-12 justify-content-
center" height="250" src="@Url.Content(Model.PRODUCT_IMAGE)" />
</div>
<div class="form-group">
<input type="file" class="form-control-file "
id="file" name="file" onchange="show(this)" required/>
</div>
<div class="form-group">
@Html.ActionLink("Cancel", "ShowProduct",
"Administrator", new { categoryId = Model.PRODUCT_CATEGORY_ID_FK }, new { @class =
"btn btn-outline-danger" })
<input type="submit" class="btn btn-outline-success
float-right" value="Update" />
</div>
</div>
</div>
</div>
</div>
</div>
}

ShowPrintingOrder.cshtml:-

@*List type model*@


@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER>
@{
ViewBag.Title = "Printing Order Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)

1
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Order Id
</th>
<th>
Product Name
</th>
<th>
Reference Image
</th>
<th>
Order Status
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop show details*@


@foreach (var order in Model)
{
<tr>
<td>
@order.ORDER_ID
</td>
<td>
@order.tbl_PRODUCT.PRODUCT_NAME
</td>
<td>
@if (order.ORDER_REFERENCE_IMAGE != null)
{
<img src="@Url.Content(order.ORDER_REFERENCE_IMAGE)"
height="40" width="50" class="zoom" />
}
</td>
<td>
@order.ORDER_STATUS
</td>
<td>
@Html.ActionLink("More", "ViewOrderDetails", new { orderId
= order.ORDER_ID }, new { @class = "btn btn-outline-success" })
@if (order.ORDER_STATUS == "Booked")
{
@Html.ActionLink("Reject", "RejectOrder", new {
orderId = order.ORDER_ID }, new { @class = "btn btn-outline-danger", onclick =
"return confirm('Are you sure you wish to reject this order?');" })
}
</td>

1
</tr>
}
</tbody>
</table>
}

ViewOrderDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRINT_JOB_ORDER @*Model*@
@{
ViewBag.Title = "Order Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Booked order Details*@


<div class="card">
<div class="card-body">
<div class="col-sm-12">
<h3>User Details</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<h5>Order Id:</h5>@Model.ORDER_ID
</div>
<div class="form-group">
<h5>Customer Name:</h5>@Model.tbl_CUSTOMER.CUSTOMER_NAME
</div>
<div class="form-group">
<h5>Phone No.:</h5>@Model.tbl_CUSTOMER.CUSTOMER_PHONE_NO
</div>
<div class="form-group">
<h5>Email Id:</h5>@Model.tbl_CUSTOMER.CUSTOMER_EMAIL_ID
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<h5>Delivery Address:</h5>
@Model.tbl_CUSTOMER.CUSTOMER_ADDRESS
</div>
</div>
</div>
<hr />
<h3>Review Order Details</h3>
<hr />
<div class="row">
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.tbl_PRODUCT.PRODUCT_IMAGE)"
class=" card-img-top border" height="300" />
<h6>Product Image</h6>
<hr />
</div>
<div class="col-sm-7">
<br />
<h4>Product Name : @Model.tbl_PRODUCT.PRODUCT_NAME</h4>
<br />
<h5>Corners : @Model.tbl_PRODUCT_CORNER.CORNER_NAME</h5>
<h5>Size : @Model.tbl_PRODUCT_SIZE.SIZE_NAME</h5>

1
<h5>Paper Quality :
@Model.tbl_PRODUCT_PAPER_QUALITY.PAPER_QUALITY_NAME</h5>
<h5>Quantity : @Model.ORDER_QUANTITY Pec</h5>
@if (Model.ORDER_PAGE_ID_FK != null)
{
<h5>Page : @Model.tbl_PRODUCT_PAGE.PAGE_NAME</h5>
}
</div>
</div>
<div class="row">
@if (Model.ORDER_REFERENCE_IMAGE != null)
{
<div class="col-sm-5 text-center">
<img src="@Url.Content(Model.ORDER_REFERENCE_IMAGE)"
class=" card-img-top border" height="300" />
<h6>Reference Image</h6>
<hr />
</div>
}
<div class="col-sm-7">
<br />
<h5>Description:</h5>
<h5>@Model.ORDER_DESCRIPTION</h5>
</div>
</div>
<br />
<div class="row">
@if (Model.ORDER_REFERENCE_PDF != null)
{
<div class="col-sm-12">
<h6>Reference Pdf (If Any)</h6>
<input type="button" class="btn btn-outline-info"
value="Show Pdf" onclick="window.open('@Url.Action("ShowPdf", "Administrator", new
{ targe = "_blank", pdfFile = Model.ORDER_REFERENCE_PDF })')" />
</div>
}
</div>
<hr />
<h3>Payment Details</h3>
<hr />
<div class="row">
<div class="col-sm-6">
<h5>Payment Type : @Model.ORDER_PAYMENT_TYPE</h5>
<h5>Finall Amount : Rs.@Model.ORDER_TOTAL_PRICE </h5>
<h6>Include All Taxes, All Service Chargers And After All
Discount</h6>
</div>
<div class="col-sm-6">
<h5>Order Status : @Model.ORDER_STATUS</h5>
@if (Model.ORDER_STATUS != "Canceled" && Model.ORDER_STATUS !=
"Rejected" && Model.ORDER_STATUS != "Waiting For Approving Id Proof" &&
Model.ORDER_STATUS != "Waiting For Payment")
{
<div class="form-group">
<h5>Order Status Option :</h5>
@Html.DropDownList("Order Option", new
SelectList(new[]{

1
new SelectListItem { Text = "Printing", Value =
Url.Action("OrderStatusOption", "Administrator", new{orderId=Model.ORDER_ID,
Status="Printing",}) },
new SelectListItem { Text = "Finished", Value =
Url.Action("OrderStatusOption", "Administrator", new{orderId=Model.ORDER_ID,
Status="Finished"}) },
new SelectListItem { Text = "Delivered", Value =
Url.Action("OrderStatusOption", "Administrator", new{orderId=Model.ORDER_ID,
Status="Delivered"}) },}, "Value", "Text"),
"----- Select -----", new { id = "urlFuntion", @class
= "form-control" })
</div>
}
</div>
</div>
</div>
</div>
</div>

ShowIdProofDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_ID_PROOF>
@{
ViewBag.Title = "Id Proof Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Id Proof No.
</th>
<th>
Customer Id
</th>
<th>
Order Id
</th>
<th>
Document Type
</th>
<th>
Document Image
</th>
<th>
Option

1
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var idProof in Model)
{
<tr>
<td>
@idProof.ID_PROOF_ID
</td>
<td>
@idProof.ID_PROOF_CUSTOMER_ID_FK
</td>
<td>
@idProof.ID_PROOF_ORDER_ID_FK
</td>
<td>
@idProof.ID_PROOF_DOCUMENT_TYPE
</td>
<td>
<img
src="@Url.Content(idProof.ID_PROOF_IMAGE)" height="40" width="50"
class="zoom" />
</td>
<td>
@if (idProof.tbl_PRINT_JOB_ORDER.ORDER_STATUS == "Waiting
For Approving Id Proof")
{
@Html.ActionLink("Approve", "ApproveIdProve", new {
orderId = idProof.ID_PROOF_ORDER_ID_FK }, new { @class = "btn btn-outline-success"
})
@Html.ActionLink("Disapprove", "DisapproveIdProve",
new { orderId = idProof.ID_PROOF_ORDER_ID_FK }, new { @class = "btn btn-outline-
danger ml-1" })
}
</td>
</tr>
}
</tbody>
</table>
}

ShowPaymentDetails.cshtml:-

@*List type model*@


@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PAYMENT>
@{
ViewBag.Title = "Payment Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}

1
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Payment Id
</th>
<th>
Order Id
</th>
<th>
Payment Type
</th>
<th>
Amount
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var payment in Model)
{
<tr>
<td>
@payment.PAYMENT_ID
</td>
<td>
@payment.ORDER_ID_FK
</td>
<td>
@payment.PAYMENT_TYPE
</td>
<td>
@payment.PAYMENT_AMOUNT
</td>
</tr>
}
</tbody>
</table>
}

ShowPaymentDetails.cshtml:-
@*Model with data*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_FEEDBACK>
@{
ViewBag.Title = "Feedback Details"; @*Page title*@
}
<h4>@ViewBag.Title</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>

1
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Feedback Id
</th>
<th>
Customer Id
</th>
<th>
Feedback Type
</th>
<th>
Message
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var feedback in Model)
{
<tr>
<td>
@feedback.FEEDBACK_ID
</td>
<td>
@feedback.FEEDBACK_CUSTOMER_ID_FK
</td>
<td>
@feedback.FEEDBACK_TYPE
</td>
<td>
@feedback.FEEDBACK_MESSAGE
</td>
</tr>
}
</tbody>
</table>
}

AdministratorController.cs:-
//importing files
using OnlinePaperWork_OPW_.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;

1
using System.Data;

//namespace to manage classes


namespace OnlinePaperWork_OPW_.Controllers
{

//administrator class
public class AdministratorController : Controller
{

//creating instense of database


private OnlinePaperWorkEntities db = new OnlinePaperWorkEntities();

//administrator login action method http get


public ActionResult Login()
{

//checking if session is null of not


if (Session["AdminId"] == null)
{
return View();
}
else
{
return RedirectToAction("ShowCategory");
}
}

//administrator login action method http post


[HttpPost]
public ActionResult Login(tbl_ADMINISTRATOR admin)
{
try
{
//checking if details is found in database
var AdminDetails = db.tbl_ADMINISTRATOR.Where(x =>
x.ADMIN_LOGIN_ID.Equals(admin.ADMIN_LOGIN_ID) &&
x.ADMIN_PASSWORD.Equals(admin.ADMIN_PASSWORD)).FirstOrDefault();
if (AdminDetails != null)
{
//creating session
Session["AdminId"] = AdminDetails.ADMIN_ID.ToString();
Session["UserName"] = AdminDetails.ADMIN_NAME.ToString();
return RedirectToAction("ShowCategory");
}
else
{
TempData["Message"] = "Wrong User Id or Password...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return View();
}

1
//administrator logout action method http get
public ActionResult Logout()
{
//clearning session
Session.Clear();
Session.Abandon();
return RedirectToAction("Login");
}

//show category action method http get


public ActionResult ShowCategory()
{
//sending all category details to view from database
return View(db.tbl_CATEGORY.ToList());
}

//add category action method http get


public ActionResult AddCategory()
{
return View();
}

//add category action method http post


[HttpPost]
public ActionResult AddCategory(tbl_CATEGORY categoryFormCollection,
HttpPostedFileBase file)
{
try
{
//adding category details to the database
tbl_CATEGORY category = new tbl_CATEGORY();
category.CATEGORY_NAME = categoryFormCollection.CATEGORY_NAME;
category.CATEGORY_IMAGE = UploadImageFile(file);
db.tbl_CATEGORY.Add(category);
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Category Added Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowCategory");
}

//update category action method http get


public ActionResult UpdateCategory(int categoryId)
{
//sending category details to the view from database using category id
return View(db.tbl_CATEGORY.Where(x => x.CATEGORY_ID ==
categoryId).FirstOrDefault());
}

//update category action method http post


[HttpPost]
public ActionResult UpdateCategory(tbl_CATEGORY categoryFormCollection,
HttpPostedFileBase file)
{
//updating category details in the database

1
tbl_CATEGORY categoryData = db.tbl_CATEGORY.Where(x => x.CATEGORY_ID
== categoryFormCollection.CATEGORY_ID).FirstOrDefault();
try
{
categoryData.CATEGORY_NAME = categoryFormCollection.CATEGORY_NAME;
if (file != null)
{
categoryData.CATEGORY_IMAGE = UploadImageFile(file);
}
else
{
categoryData.CATEGORY_IMAGE = categoryData.CATEGORY_IMAGE;
}
db.Entry(categoryData).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Category Updated Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowCategory");
}

//delete category action method http get


public ActionResult DeleteCategory(int categoryId)
{
try
{
//deleting category details from database
tbl_CATEGORY categoryData = db.tbl_CATEGORY.Where(x =>
x.CATEGORY_ID == categoryId).FirstOrDefault();
db.Entry(categoryData).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Category Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowCategory");
}

//show product action method http get


public ActionResult ShowProduct(int categoryId)
{
//sending product details to the view from database using category id
return View(db.tbl_PRODUCT.Where(x => x.PRODUCT_CATEGORY_ID_FK ==
categoryId).ToList());
}

//add product action method http get


public ActionResult AddProduct()
{
List<tbl_CATEGORY> categorylist = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categorylist, "CATEGORY_ID",
"CATEGORY_NAME");

1
List<SelectListItem> YesNoList = new List<SelectListItem>();
YesNoList.Add(new SelectListItem { Text = "No", Value = "false",
Selected = true });
YesNoList.Add(new SelectListItem { Text = "Yes", Value = "true", });

ViewBag.YesNoListBag = YesNoList;

return View();
}

//add product action method http post


[HttpPost]
public ActionResult AddProduct(tbl_PRODUCT productFormCollection,
HttpPostedFileBase file)
{
try
{

//adding product details in the database


tbl_PRODUCT product = new tbl_PRODUCT();
product.PRODUCT_NAME = productFormCollection.PRODUCT_NAME;
product.PRODUCT_PRICE = productFormCollection.PRODUCT_PRICE;
product.PRODUCT_QUANTITY = productFormCollection.PRODUCT_QUANTITY;
product.PRODUCT_IMAGE = UploadImageFile(file);
product.PRODUCT_DESCRIPTION =
productFormCollection.PRODUCT_DESCRIPTION;
product.PRODUCT_PAGE_DESIGN_REQUIRED =
productFormCollection.PRODUCT_PAGE_DESIGN_REQUIRED;
product.PRODUCT_ID_PROOF_REQUIRED =
productFormCollection.PRODUCT_ID_PROOF_REQUIRED;
product.PRODUCT_CATEGORY_ID_FK =
productFormCollection.PRODUCT_CATEGORY_ID_FK;
db.tbl_PRODUCT.Add(product);
db.SaveChanges();
TempData["Message"] = "Product Added Successfully...";
return RedirectToAction("ShowProduct", new { categoryId =
product.PRODUCT_CATEGORY_ID_FK });

}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return View();
}

//update product action method http get


public ActionResult UpdateProduct(int productId)
{
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");

List<SelectListItem> YesNoList = new List<SelectListItem>();


YesNoList.Add(new SelectListItem { Text = "No", Value = "false",
Selected = true });
YesNoList.Add(new SelectListItem { Text = "Yes", Value = "true", });

ViewBag.YesNoListBag = YesNoList;

1
return View(db.tbl_PRODUCT.Where(x => x.PRODUCT_ID ==
productId).FirstOrDefault());
}

//update product action method http post


[HttpPost]
public ActionResult UpdateProduct(tbl_PRODUCT productFormCollection,
HttpPostedFileBase file)
{
//updating product details in the database
tbl_PRODUCT productData = db.tbl_PRODUCT.Where(x => x.PRODUCT_ID ==
productFormCollection.PRODUCT_ID).FirstOrDefault();
try
{
productData.PRODUCT_NAME = productFormCollection.PRODUCT_NAME;
if (file != null)
{
productData.PRODUCT_IMAGE = UploadImageFile(file);
}
else
{
productData.PRODUCT_IMAGE = productData.PRODUCT_IMAGE;
}
db.Entry(productData).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Product Updated Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowProduct", new { categoryId =
productFormCollection.PRODUCT_CATEGORY_ID_FK });
}

//detete product action method http get


public ActionResult DeleteProduct(int productId, int categoryId)
{
try
{
//deleting product details from database
tbl_PRODUCT productData = db.tbl_PRODUCT.Find(productId);
db.Entry(productData).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Product Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowProduct", new { categoryId });
}

//show printing order action method http get


public ActionResult ShowPrintingOrder()
{
//sending order details to the view from database

1
return View(db.tbl_PRINT_JOB_ORDER.ToList().OrderByDescending(x =>
x.ORDER_ID));
}

//view order details action method http get


public ActionResult ViewOrderDetails(int orderId)
{
//sending single order details to view from database using order id
return View(db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
orderId).SingleOrDefault());
}

//reject order action method http get


public ActionResult RejectOrder(int orderId)
{
try
{
//rejecting order and saving details in the database using order id
var orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
orderId).FirstOrDefault();
orderDetails.ORDER_STATUS = "Rejected";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Order Rejected Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPrintingOrder");
}

//order status option action method http get


public ActionResult OrderStatusOption(int orderId, string Status)
{
try
{
//updating order status in the database using order id
var orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x => x.ORDER_ID ==
orderId).FirstOrDefault();
orderDetails.ORDER_STATUS = Status;
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Order Status Updated Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPrintingOrder");
}

//show id proof action method http get


public ActionResult ShowIdProof()
{
//sending id proof details to view from database
return View(db.tbl_ID_PROOF.ToList().OrderByDescending(x =>
x.ID_PROOF_ORDER_ID_FK));
}

1
//approve id prove action method http get
public ActionResult ApproveIdProve(int orderId)
{
try
{
//saving appove id proof details in database using order id
tbl_PRINT_JOB_ORDER orderDetails = db.tbl_PRINT_JOB_ORDER.Where(x
=> x.ORDER_ID == orderId).SingleOrDefault();
orderDetails.ORDER_STATUS = "Waiting For Payment";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Id Proof Approved Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowIdProof");
}

//disapprove id prove action method http get


public ActionResult DisapproveIdProve(int orderId)
{
try
{
//saving disappove id proof details in database using order id
tbl_PRINT_JOB_ORDER orderDetails =
db.tbl_PRINT_JOB_ORDER.Where(x
=> x.ORDER_ID == orderId).SingleOrDefault();
orderDetails.ORDER_STATUS = "Id Proof Disapproved";
db.Entry(orderDetails).State = EntityState.Modified;
db.SaveChanges();
TempData["Message"] = "Id Proof Disapproved Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowIdProof");
}

//show payment details action method http get


public ActionResult ShowPaymentDetails()
{
//sending payment details to the view from database
return View(db.tbl_PAYMENT.ToList().OrderByDescending(x =>
x.ORDER_ID_FK));
}

//show feedback details action method http get


public ActionResult ShowFeedbackDetails()
{
//sending feedback details to the view from database
return View(db.tbl_FEEDBACK.ToList().OrderByDescending(x =>
x.FEEDBACK_ID));
}

1
//upload image file function
public string UploadImageFile(HttpPostedFileBase file)
{
var allowedExtensions = new[] { ".Jpg", ".png", ".jpg", ".jpeg" };
string path = "Not Available";
if (file != null)
{
var name = Path.GetFileNameWithoutExtension(file.FileName);
var ext = Path.GetExtension(file.FileName);
if (allowedExtensions.Contains(ext))
{
try
{
string myfile = name + "_" +
DateTime.Now.ToString("dd_MM_yyyy_hh_mm_tt") + ext;
path = Path.Combine(Server.MapPath("~/images/"), myfile);
file.SaveAs(path);

path = "~/images/" + myfile;


}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
}
else
{
TempData["Message"] = "Only jpg, png or jpeg file format are
acceptable...";
}
}
return path;
}

//show pdf function


public FileResult ShowPdf(string pdfFile)
{
string ReportURL =
System.Web.HttpContext.Current.Server.MapPath(pdfFile);
byte[] FileBytes = System.IO.File.ReadAllBytes(ReportURL);
return File(FileBytes, "application/pdf");
}

}
}

ShowCornerDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT_CORNER>
@{
ViewBag.Title = "Corner Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Corner", "AddCornerDetails", null, new { @class = "btn
btn-outline-primary float-right" })
</h4>
<hr />

1
@*Condition to check if data is null*@
@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{
@*Table to show data*@
<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Category Name
</th>
<th>
Corner
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>
@*For each loop to show details*@
@foreach (var category in ViewBag.categoryListBag)
{
foreach (var corner in Model.Where(x => x.CORNER_CATEGORY_ID_FK ==
category.CATEGORY_ID))
{
<tr>
<td>
@category.CATEGORY_NAME
</td>
<td>
@corner.CORNER_NAME
</td>
<td>
@Html.ActionLink("Update", "UpdateCornerDetails", new
{ cornerId = corner.CORNER_ID }, new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete", "DeleteCornerDetails", new
{ cornerId = corner.CORNER_ID }, new { @class = "btn btn-outline-danger", onclick
= "return confirm('Are you sure you wish to delete this corner detail?');" })
</td>
</tr>
}
}
</tbody>
</table>
}

AddCornerDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_CORNER @*Model*@
@{
ViewBag.Title = "Add Corner Details";
}

1
@*Add corner details form*@
@using (Html.BeginForm("AddCornerDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x =>
x.CORNER_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.CORNER_CATEGORY_ID_FK,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Corner Name</label>
@Html.TextBoxFor(x => x.CORNER_NAME, new { @class = "form-
control", @placeholder = "Corner Name" })
@Html.ValidationMessageFor(x => x.CORNER_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowCornerDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Create" />
</div>
</div>
</div>
</div>
</div>
}

UpdateCornerDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_CORNER @*Model*@
@{
ViewBag.Title = "Update Corner Details"; @*Page title*@
}

@*Update corner details form*@


@using (Html.BeginForm("UpdateCornerDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.CORNER_ID)
<div class="form-group">

1
<label>Category Name</label>
@Html.DropDownListFor(x =>
x.CORNER_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.CORNER_CATEGORY_ID_FK,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Corner Name</label>
@Html.TextBoxFor(x => x.CORNER_NAME, new { @class = "form-
control", @placeholder = "Corner Name" })
@Html.ValidationMessageFor(x => x.CORNER_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowCornerDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Update" />
</div>
</div>
</div>
</div>
</div>
}

ShowPaperQualityDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAPER_QUALITY>
@{
ViewBag.Title = "Paper Quality Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Paper Quality", "AddPaperQualityDetails", null, new {
@class = "btn btn-outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Category Name
</th>
<th>
Paper Quality
</th>
<th>

1
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var category in ViewBag.categoryListBag)
{
foreach (var quality in Model.Where(x =>
x.PAPER_QUALITY_CATEGORY_ID_FK == category.CATEGORY_ID))
{
<tr>
<td>
@category.CATEGORY_NAME
</td>
<td>
@quality.PAPER_QUALITY_NAME
</td>
<td>
@Html.ActionLink("Update",
"UpdatePaperQualityDetails", new { paperQualityId = quality.PAPER_QUALITY_ID },
new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete",
"DeletePaperQualityDetails", new { paperQualityId = quality.PAPER_QUALITY_ID },
new { @class = "btn btn-outline-danger", onclick = "return confirm('Are you sure
you wish to delete this paper quality detail?');" })
</td>
</tr>
}
}
</tbody>
</table>
}

AddPaperQualityDetails.cshtml:-
@*Model*@
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAPER_QUALITY
@{
ViewBag.Title = "Add Paper Quality Details"; @*Page title*@
}

@*Add paper quality details form*@


@using (Html.BeginForm("AddPaperQualityDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x => x.PAPER_QUALITY_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })

1
@Html.ValidationMessageFor(x =>
x.PAPER_QUALITY_CATEGORY_ID_FK, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Paper Quality Name</label>
@Html.TextBoxFor(x => x.PAPER_QUALITY_NAME, new { @class
= "form-control", @placeholder = "Paper Quality Name" })
@Html.ValidationMessageFor(x => x.PAPER_QUALITY_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowPaperQualityDetails", null,
new { @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Create" />
</div>
</div>
</div>
</div>
</div>
}

UpdatePaperQualityDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAPER_QUALITY @*Model*@
@{
ViewBag.Title = "Update Paper Quality Details"; @*Page title*@
}

@*Update paper quality details form*@


@using (Html.BeginForm("UpdatePaperQualityDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.PAPER_QUALITY_ID)
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x => x.PAPER_QUALITY_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x =>
x.PAPER_QUALITY_CATEGORY_ID_FK, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Quality Name</label>
@Html.TextBoxFor(x => x.PAPER_QUALITY_NAME, new { @class
= "form-control", @placeholder = "Quality Name" })
@Html.ValidationMessageFor(x => x.PAPER_QUALITY_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowPaperQualityDetails", null,
new { @class = "btn btn-outline-warning" })

1
<input type="submit" class="btn btn-outline-success float-
right" value="Update" />
</div>
</div>
</div>
</div>
</div>
}

ShowSizeDetails.cshtml:-
@*List type details model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT_SIZE>
@{
ViewBag.Title = "Size Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Size", "AddSizeDetails", null, new { @class = "btn btn-
outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Category Name
</th>
<th>
Size
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var category in ViewBag.categoryListBag)
{
foreach (var size in Model.Where(x => x.SIZE_CATEGORY_ID_FK ==
category.CATEGORY_ID))
{
<tr>
<td>
@category.CATEGORY_NAME
</td>
<td>

1
@size.SIZE_NAME
</td>
<td>
@Html.ActionLink("Update", "UpdateSizeDetails", new {
sizeId = size.SIZE_ID }, new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete", "DeleteSizeDetails", new {
sizeId = size.SIZE_ID }, new { @class = "btn btn-outline-danger", onclick =
"return confirm('Are you sure you wish to delete this size detail?');" })
</td>
</tr>
}
}
</tbody>
</table>
}

AddSizeDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_SIZE @*Model*@
@{
ViewBag.Title = "Add Size Details"; @*Page title*@
}

@*Add size details form*@


@using (Html.BeginForm("AddSizeDetails", "ProductSpecification", FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x =>
x.SIZE_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.SIZE_CATEGORY_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Size Name</label>
@Html.TextBoxFor(x => x.SIZE_NAME, new { @class = "form-
control", @placeholder = "Size Name" })
@Html.ValidationMessageFor(x => x.SIZE_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowSizeDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Create" />
</div>
</div>
</div>
</div>
</div>
}

1
UpdateSizeDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_SIZE @*Model*@
@{
ViewBag.Title = "Update Size Details"; @*Page title*@
}

@*Update size details form*@


@using (Html.BeginForm("UpdateSizeDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.SIZE_ID)
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x =>
x.SIZE_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.SIZE_CATEGORY_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Size Name</label>
@Html.TextBoxFor(x => x.SIZE_NAME, new { @class = "form-
control", @placeholder = "Size Name" })
@Html.ValidationMessageFor(x => x.SIZE_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowSizeDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Update" />
</div>
</div>
</div>
</div>
</div>
}

ShowPageDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAGE>
@{
ViewBag.Title = "Page Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Page", "AddPageDetails", null, new { @class = "btn btn-
outline-primary float-right" })
</h4>

1
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Category Name
</th>
<th>
Page
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop to category id*@


@foreach (var category in ViewBag.categoryListBag)
{

@*For each loop to category details*@


foreach (var page in Model.Where(x => x.PAGE_CATEGORY_ID_FK ==
category.CATEGORY_ID))
{
<tr>
<td>
@category.CATEGORY_NAME
</td>
<td>
@page.PAGE_NAME
</td>
<td>
@Html.ActionLink("Update", "UpdatePageDetails", new {
pageId = page.PAGE_ID }, new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete", "DeletePageDetails", new {
pageId = page.PAGE_ID }, new { @class = "btn btn-outline-danger", onclick =
"return confirm('Are you sure you wish to delete this page detail?');" })
</td>
</tr>
}
}
</tbody>
</table>
}

AddPageDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAGE @*Model*@

1
@{
ViewBag.Title = "Add Page Details"; @*Page title*@
}

@*Add page details form*@


@using (Html.BeginForm("AddPageDetails", "ProductSpecification", FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x =>
x.PAGE_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.PAGE_CATEGORY_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Page Name</label>
@Html.TextBoxFor(x => x.PAGE_NAME, new { @class = "form-
control", @placeholder = "Page Name" })
@Html.ValidationMessageFor(x => x.PAGE_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowPageDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Create" />
</div>
</div>
</div>
</div>
</div>
}

UpdatePageDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_PRODUCT_PAGE @*Model*@
@{
ViewBag.Title = "Update Page Details"; @*Page title*@
}

@*Update page details form*@


@using (Html.BeginForm("UpdatePageDetails", "ProductSpecification",
FormMethod.Post))
{
<div class="d-flex justify-content-center">
<div class="col-sm-5">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">

1
@Html.HiddenFor(x => x.PAGE_ID)
<div class="form-group">
<label>Category Name</label>
@Html.DropDownListFor(x => x.PAGE_CATEGORY_ID_FK,
ViewBag.categoryListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.PAGE_CATEGORY_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Page Name</label>
@Html.TextBoxFor(x => x.PAGE_NAME, new { @class = "form-
control", @placeholder = "Page Name" })
@Html.ValidationMessageFor(x => x.PAGE_NAME, "", new {
@class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowPageDetails", null, new {
@class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success float-
right" value="Update" />
</div>
</div>
</div>
</div>
</div>
}

ProductSpecificationController.cs
//importing files
using OnlinePaperWork_OPW_.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.Mvc;

//namespace to manage classes


namespace OnlinePaperWork_OPW_.Controllers
{
//product specification class
public class ProductSpecificationController : Controller
{
//creating instance of database
private OnlinePaperWorkEntities db = new OnlinePaperWorkEntities();

//show corner details action method http get


public ActionResult ShowCornerDetails()
{
//sending all product corner and category details to view from database
ViewBag.categoryListBag = db.tbl_CATEGORY.ToList();
return View(db.tbl_PRODUCT_CORNER.ToList().OrderByDescending(x =>
x.CORNER_ID));
}

1
//show paper details action method http get
public ActionResult ShowPaperQualityDetails()
{
//sending all product paper quality and category details to view from database
ViewBag.categoryListBag = db.tbl_CATEGORY.ToList();
return View(db.tbl_PRODUCT_PAPER_QUALITY.ToList().OrderByDescending(x
=> x.PAPER_QUALITY_ID));
}

//show size details action method http get


public ActionResult ShowSizeDetails()
{
//sending all product size and category details to view from database
ViewBag.categoryListBag = db.tbl_CATEGORY.ToList();
return View(db.tbl_PRODUCT_SIZE.ToList().OrderByDescending(x =>
x.SIZE_ID));
}

//show page details action method http get


public ActionResult ShowPageDetails()
{
//sending all product page and category details to view from database
ViewBag.categoryListBag = db.tbl_CATEGORY.ToList();
return View(db.tbl_PRODUCT_PAGE.ToList().OrderByDescending(x =>
x.PAGE_ID));
}

//add corner details action method http get


public ActionResult AddCornerDetails()
{
//sending all category details to view from database
List<tbl_CATEGORY> categoryList =
db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View();
}

//add corner details action method http post


[HttpPost]
public ActionResult AddCornerDetails(tbl_PRODUCT_CORNER corner)
{
//adding corner details in the database
try
{
if (ModelState.IsValid)
{
db.tbl_PRODUCT_CORNER.Add(corner);
db.SaveChanges();
TempData["Message"] = "Coner Details Added Successfully...";
}
else
{

TempData["Message"] = "Error, Try Again Later...";


}
}
catch (Exception e)
{
TempData["Message"] = e.Message;

1
}
return RedirectToAction("ShowCornerDetails");
}

//add paper quality details action method http get


public ActionResult AddPaperQualityDetails()
{
//sending all category details to view from database
List<tbl_CATEGORY> categoryList =
db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View();
}

//add paper quality details action method http post


[HttpPost]
public ActionResult AddPaperQualityDetails(tbl_PRODUCT_PAPER_QUALITY
paperQuality)
{
//adding paper quality details in the database
try
{
if (ModelState.IsValid)
{
db.tbl_PRODUCT_PAPER_QUALITY.Add(paperQuality);
db.SaveChanges();
TempData["Message"] = "Paper Quality Details Added
Successfully...";
}
else
{

TempData["Message"] = "Error, Try Again Later...";


}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPaperQualityDetails");
}

//add size details action method http get


public ActionResult AddSizeDetails()
{
//sending all category details to view from database
List<tbl_CATEGORY> categoryList =
db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View();
}

//add size details action method http post


[HttpPost]
public ActionResult AddSizeDetails(tbl_PRODUCT_SIZE size)
{
//adding size details in the database
try

1
{

1
if (ModelState.IsValid)
{
db.tbl_PRODUCT_SIZE.Add(size);
db.SaveChanges();
TempData["Message"] = "Size Details Added Successfully...";
}
else
{

TempData["Message"] = "Error, Try Again Later...";


}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowSizeDetails");
}

//add page details action method http get


public ActionResult AddPageDetails()
{
//sending all category details to view from database
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View();
}

//add page details action method http post


[HttpPost]
public ActionResult AddPageDetails(tbl_PRODUCT_PAGE page)
{
//adding page details in the database
try
{
if (ModelState.IsValid)
{
db.tbl_PRODUCT_PAGE.Add(page);
db.SaveChanges();
TempData["Message"] = "Page Details Added Successfully...";
}
else
{

TempData["Message"] = "Error, Try Again Later...";


}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPageDetails");
}

//update corner details action method http get


public ActionResult UpdateCornerDetails(int cornerId)
{
//sending corner and category details to view from database using corner id

1
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View(db.tbl_PRODUCT_CORNER.Where(x => x.CORNER_ID ==
cornerId).FirstOrDefault());
}

//update corner details action method http post


[HttpPost]
public ActionResult UpdateCornerDetails(tbl_PRODUCT_CORNER corner)
{
//updating corner details in database
try
{
if (ModelState.IsValid)
{
tbl_PRODUCT_CORNER cornerDetails =
db.tbl_PRODUCT_CORNER.Where(x => x.CORNER_ID ==
corner.CORNER_ID).FirstOrDefault();
cornerDetails.CORNER_NAME = corner.CORNER_NAME;
cornerDetails.CORNER_CATEGORY_ID_FK =
corner.CORNER_CATEGORY_ID_FK;
db.Entry(cornerDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Corner Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowCornerDetails");
}

//update paper quality details action method http get


public ActionResult UpdatePaperQualityDetails(int paperQualityId)
{

//sending paper quality and category details to view from database using paper
quality id
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View(db.tbl_PRODUCT_PAPER_QUALITY.Where(x => x.PAPER_QUALITY_ID
== paperQualityId).FirstOrDefault());
}

//update paper quality details action method http post


[HttpPost]
public ActionResult UpdatePaperQualityDetails(tbl_PRODUCT_PAPER_QUALITY
paperQuality)
{

1
//updating corner details in database
try
{
if (ModelState.IsValid)
{
tbl_PRODUCT_PAPER_QUALITY paperQualityDetails =
db.tbl_PRODUCT_PAPER_QUALITY.Where(x => x.PAPER_QUALITY_ID ==
paperQuality.PAPER_QUALITY_ID).FirstOrDefault();
paperQualityDetails.PAPER_QUALITY_NAME =
paperQuality.PAPER_QUALITY_NAME;
paperQualityDetails.PAPER_QUALITY_CATEGORY_ID_FK =
paperQuality.PAPER_QUALITY_CATEGORY_ID_FK;
db.Entry(paperQualityDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Paper Quality Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPaperQualityDetails");
}

//update size details action method http get


public ActionResult UpdateSizeDetails(int sizeId)
{
//sending size and category details to view from database using size id
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View(db.tbl_PRODUCT_SIZE.Where(x => x.SIZE_ID ==
sizeId).FirstOrDefault());
}

//update size details action method http post


[HttpPost]
public ActionResult UpdateSizeDetails(tbl_PRODUCT_SIZE size)
{

//updating corner details in database


try
{
if (ModelState.IsValid)
{
tbl_PRODUCT_SIZE sizeDetails = db.tbl_PRODUCT_SIZE.Where(x =>
x.SIZE_ID == size.SIZE_ID).FirstOrDefault();
sizeDetails.SIZE_NAME = size.SIZE_NAME;
sizeDetails.SIZE_CATEGORY_ID_FK = size.SIZE_CATEGORY_ID_FK;
db.Entry(sizeDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();

1
TempData["Message"] = "Size Quality Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowSizeDetails");
}

//update page details action method http get


public ActionResult UpdatePageDetails(int pageId)
{
//sending page and category details to view from database using page id
List<tbl_CATEGORY> categoryList = db.tbl_CATEGORY.ToList();
ViewBag.categoryListBag = new SelectList(categoryList, "CATEGORY_ID",
"CATEGORY_NAME");
return View(db.tbl_PRODUCT_PAGE.Where(x => x.PAGE_ID ==
pageId).FirstOrDefault());
}

//update page details action method http post


[HttpPost]
public ActionResult UpdatePageDetails(tbl_PRODUCT_PAGE page)
{

//updating corner details in database


try
{
if (ModelState.IsValid)
{
tbl_PRODUCT_PAGE pageDetails = db.tbl_PRODUCT_PAGE.Where(x =>
x.PAGE_ID == page.PAGE_ID).FirstOrDefault();
pageDetails.PAGE_NAME = page.PAGE_NAME;
pageDetails.PAGE_CATEGORY_ID_FK = page.PAGE_CATEGORY_ID_FK;
db.Entry(pageDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Page Quality Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}

return RedirectToAction("ShowPageDetails");
}

1
//delete corner details action method http get
public ActionResult DeleteCornerDetails(int cornerId)
{

//deleting corner details form database using corner id


try
{
tbl_PRODUCT_CORNER cornerDetails = db.tbl_PRODUCT_CORNER.Where(x
=> x.CORNER_ID == cornerId).FirstOrDefault();
db.Entry(cornerDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Corner Details Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowCornerDetails");
}

//delete paper quality details action method http get


public ActionResult DeletePaperQualityDetails(int paperQualityId)
{

//deleting paper quality details form database using paper quality id


try
{
tbl_PRODUCT_PAPER_QUALITY paperQualityDetails =
db.tbl_PRODUCT_PAPER_QUALITY.Where(x => x.PAPER_QUALITY_ID ==
paperQualityId).FirstOrDefault();
db.Entry(paperQualityDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Paper Quality Details Deleted
Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPaperQualityDetails");
}

//delete size details action method http get


public ActionResult DeleteSizeDetails(int sizeId)
{

//deleting size details form database using size id


try
{
tbl_PRODUCT_SIZE sizeDetails = db.tbl_PRODUCT_SIZE.Where(x =>
x.SIZE_ID == sizeId).FirstOrDefault();
db.Entry(sizeDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Size Details Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}

1
return RedirectToAction("ShowSizeDetails");
}

//delete page details action method http get


public ActionResult DeletePageDetails(int pageId)
{

//deleting page details form database using page id


try
{
tbl_PRODUCT_PAGE pageDetails = db.tbl_PRODUCT_PAGE.Where(x =>
x.PAGE_ID == pageId).FirstOrDefault();
db.Entry(pageDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Page Details Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowPageDetails");
}
}
}

ShowRawMaterialDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_RAW_MATERIAL>
@{
ViewBag.Title = "Raw Material Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Raw Material", "AddRawMaterialDetails", null, new {
@class = "btn btn-outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Supplier Name
</th>
<th>
Material Name
</th>
<th>

1
Quantity
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var material in Model)
{
<tr>
<td>
@material.tbl_SUPPLIER.SUPPLIER_NAME
</td>
<td>
@material.RAW_MATERIAL_NAME
</td>
<td>
@material.RAW_MATERIAL_QUANTITY
</td>
<td>
@Html.ActionLink("Update", "UpdateRawMaterialDetails", new
{ materialId = material.RAW_MATERIAL_ID }, new { @class = "btn btn-outline-
warning" })
@Html.ActionLink("Delete", "DeleteRawMaterialDetails", new
{ materialId = material.RAW_MATERIAL_ID }, new { @class = "btn btn-outline-
danger", onclick = "return confirm('Are you sure you wish to delete this raw
material detail?');" })
</td>
</tr>
}
</tbody>
</table>
}

AddRawMaterialDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_RAW_MATERIAL @*Model*@
@{
ViewBag.Title = "Add Raw Material Details"; @*Page title*@
}

@*Add raw meterial details form*@


@using (Html.BeginForm("AddRawMaterialDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Material Name</label>

1
@Html.TextBoxFor(x => x.RAW_MATERIAL_NAME, new {
@class = "form-control", @placeholder = "Material Name" })
@Html.ValidationMessageFor(x => x.RAW_MATERIAL_NAME,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Material Quantity</label>
@Html.TextBoxFor(x => x.RAW_MATERIAL_QUANTITY, new {
@class = "form-control", @placeholder = "Material Quantity" })
@Html.ValidationMessageFor(x =>
x.RAW_MATERIAL_QUANTITY, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Supplier</label>
@Html.DropDownListFor(x => x.SUPPLIER_ID_FK,
ViewBag.supplierListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.SUPPLIER_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowRawMaterialDetails",
null, new { @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Add" />
</div>
</div>
</div>
</div>
</div>
</div>
}

UpdateRawMaterialDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_RAW_MATERIAL @*Model*@
@{
ViewBag.Title = "Update Raw Material Details"; @*Page title*@
}

@*update raw material details form*@


@using (Html.BeginForm("UpdateRawMaterialDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.RAW_MATERIAL_ID)
<div class="form-group">
<label>Material Name</label>
@Html.TextBoxFor(x => x.RAW_MATERIAL_NAME, new {
@class = "form-control", @placeholder = "Material Name" })

1
@Html.ValidationMessageFor(x => x.RAW_MATERIAL_NAME,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Material Quantity</label>
@Html.TextBoxFor(x => x.RAW_MATERIAL_QUANTITY, new {
@class = "form-control", @placeholder = "Material Quantity" })
@Html.ValidationMessageFor(x =>
x.RAW_MATERIAL_QUANTITY, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Supplier</label>
@Html.DropDownListFor(x => x.SUPPLIER_ID_FK,
ViewBag.supplierListBag as SelectList, "-----Select-----", new { @class = "form-
control" })
@Html.ValidationMessageFor(x => x.SUPPLIER_ID_FK, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowRawMaterialDetails",
null, new { @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Update" />
</div>
</div>
</div>
</div>
</div>
</div>
}

ShowSupplierDetails.cshtml:-
@*List type model*@
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_SUPPLIER>
@{
ViewBag.Title = "Supplier Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Supplier", "AddSupplierDetails", null, new { @class =
"btn btn-outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>

1
<th>
Supplier Name
</th>
<th>
Phone Number
</th>
<th>
Shop Address
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>
@*For each loop to show details*@
@foreach (var supplier in Model)
{
<tr>
<td>
@supplier.SUPPLIER_NAME
</td>
<td>
@supplier.SUPPLIER_PHONE_NUMBER
</td>
<td>
@supplier.SUPPLIER_SHOP_ADDRESS
</td>
<td>
@Html.ActionLink("Update", "UpdateSupplierDetails", new {
supplierId = supplier.SUPPLIER_ID }, new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete", "DeleteSupplierDetails", new {
supplierId = supplier.SUPPLIER_ID }, new { @class = "btn btn-outline-danger",
onclick = "return confirm('Are you sure you wish to delete this supplier
detail?');" })
</td>
</tr>
}
</tbody>
</table>
}

AddSupplierDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_SUPPLIER @*Model*@
@{
ViewBag.Title = "Add Supplier Details"; @*Page title*@
}

@*Add Supplier details form*@


@using (Html.BeginForm("AddSupplierDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>

1
</div>
<div class="card-body">
<div class="form-group">
<label>Supplier Name</label>
@Html.TextBoxFor(x => x.SUPPLIER_NAME, new { @class
= "form-control", @placeholder = "Supplier Name" })
@Html.ValidationMessageFor(x => x.SUPPLIER_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone Number</label>
@Html.TextBoxFor(x => x.SUPPLIER_PHONE_NUMBER, new {
@class = "form-control", @placeholder = "Phone Number" })
@Html.ValidationMessageFor(x =>
x.SUPPLIER_PHONE_NUMBER, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Shop Address</label>
@Html.TextAreaFor(x => x.SUPPLIER_SHOP_ADDRESS, new {
@class = "form-control", @placeholder = "Shop Address" })
@Html.ValidationMessageFor(x =>
x.SUPPLIER_SHOP_ADDRESS, "", new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowSupplierDetails", null,
new { @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Add" />
</div>
</div>
</div>
</div>
</div>
</div>
}

UpdateSupplierDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_SUPPLIER @*Model*@
@{
ViewBag.Title = "Update Supplier Details"; @*Page title*@
}

@*Update supplier details form*@


@using (Html.BeginForm("UpdateSupplierDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.SUPPLIER_ID)
<div class="form-group">
<label>Supplier Name</label>
@Html.TextBoxFor(x => x.SUPPLIER_NAME, new { @class
= "form-control", @placeholder = "Supplier Name" })

1
@Html.ValidationMessageFor(x => x.SUPPLIER_NAME, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone Number</label>
@Html.TextBoxFor(x => x.SUPPLIER_PHONE_NUMBER, new {
@class = "form-control", @placeholder = "Phone Number" })
@Html.ValidationMessageFor(x =>
x.SUPPLIER_PHONE_NUMBER, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Shop Address</label>
@Html.TextAreaFor(x => x.SUPPLIER_SHOP_ADDRESS, new {
@class = "form-control", @placeholder = "Shop Address" })
@Html.ValidationMessageFor(x =>
x.SUPPLIER_SHOP_ADDRESS, "", new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowSupplierDetails", null,
new { @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Update" />
</div>
</div>
</div>
</div>
</div>
</div>
}

ShowStaffDetails.cshtml:-
@model IEnumerable<OnlinePaperWork_OPW_.Models.tbl_STAFF> @*List type model*@
@{
ViewBag.Title = "Staff Details"; @*Page title*@
}
<h4>
@ViewBag.Title
@Html.ActionLink("Add Staff", "AddStaffDetails", null, new { @class = "btn
btn-outline-primary float-right" })
</h4>
<hr />

@*Condition to check if data is null*@


@if (Model.Count() == 0)
{
<h4>No Details Found...</h4>
}
else
{

@*Table to show data*@


<table class="table table-hover table-bordered table-striped table-dark">
<thead>
<tr>
<th>
Staff Name
</th>
<th>

1
Phone Number
</th>
<th>
Address
</th>
<th>
Designation
</th>
<th>
Salary
</th>
<th>
Option
</th>
</tr>
</thead>
<tbody>

@*For each loop to show details*@


@foreach (var staff in Model)
{
<tr>
<td>
@staff.STAFF_NAME
</td>
<td>
@staff.STAFF_PHONE_NO
</td>
<td>
@staff.STAFF_ADDRESS
</td>
<td>
@staff.STAFF_DESIGNATION
</td>
<td>
@staff.STAFF_SALARY
</td>
<td>
@Html.ActionLink("Update", "UpdateStaffDetails", new
{ staffId = staff.STAFF_ID }, new { @class = "btn btn-outline-warning" })
@Html.ActionLink("Delete", "DeleteStaffDetails", new {
staffId = staff.STAFF_ID }, new { @class = "btn btn-outline-danger", onclick =
"return confirm('Are you sure you wish to delete this staff detail?');" })
</td>
</tr>
}
</tbody>
</table>
}

AddStaffDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_STAFF @*Model*@
@{
ViewBag.Title = "Add Staff Details"; @*Page title*@
}

1
@*Add staff details form*@
@using (Html.BeginForm("AddStaffDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
<div class="form-group">
<label>Staff Name</label>
@Html.TextBoxFor(x => x.STAFF_NAME, new { @class =
"form-control", @placeholder = "Staff Name" })
@Html.ValidationMessageFor(x => x.STAFF_NAME, "", new
{ @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone Number</label>
@Html.TextBoxFor(x => x.STAFF_PHONE_NO, new { @class
= "form-control", @placeholder = "Phone Number" })
@Html.ValidationMessageFor(x => x.STAFF_PHONE_NO, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Address</label>
@Html.TextAreaFor(x => x.STAFF_ADDRESS, new { @class
= "form-control", @placeholder = "Address" })
@Html.ValidationMessageFor(x => x.STAFF_ADDRESS, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Designation</label>
@Html.TextBoxFor(x => x.STAFF_DESIGNATION, new {
@class = "form-control", @placeholder = "Designation" })
@Html.ValidationMessageFor(x => x.STAFF_DESIGNATION,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Salary</label>
@Html.TextBoxFor(x => x.STAFF_SALARY, new { @class =
"form-control", @placeholder = "Salary" })
@Html.ValidationMessageFor(x => x.STAFF_SALARY, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowStaffDetails", null, new
{ @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Add" />
</div>
</div>
</div>
</div>
</div>
</div>
}

1
UpdateStaffDetails.cshtml:-
@model OnlinePaperWork_OPW_.Models.tbl_STAFF @*Model*@
@{
ViewBag.Title = "Update Staff Details"; @*Page title*@
}

@*Update staff details form*@


@using (Html.BeginForm("UpdateStaffDetails", "Utility", FormMethod.Post))
{
<div class="container">
<div class="d-flex justify-content-center">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<h2>@ViewBag.Title</h2>
</div>
<div class="card-body">
@Html.HiddenFor(x => x.STAFF_ID)
<div class="form-group">
<label>Staff Name</label>
@Html.TextBoxFor(x => x.STAFF_NAME, new { @class =
"form-control", @placeholder = "Staff Name" })
@Html.ValidationMessageFor(x => x.STAFF_NAME, "", new
{ @class = "text-danger" })
</div>
<div class="form-group">
<label>Phone Number</label>
@Html.TextBoxFor(x => x.STAFF_PHONE_NO, new { @class
= "form-control", @placeholder = "Phone Number" })
@Html.ValidationMessageFor(x => x.STAFF_PHONE_NO, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Address</label>
@Html.TextAreaFor(x => x.STAFF_ADDRESS, new { @class
= "form-control", @placeholder = "Address" })
@Html.ValidationMessageFor(x => x.STAFF_ADDRESS, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Designation</label>
@Html.TextBoxFor(x => x.STAFF_DESIGNATION, new {
@class = "form-control", @placeholder = "Designation" })
@Html.ValidationMessageFor(x => x.STAFF_DESIGNATION,
"", new { @class = "text-danger" })
</div>
<div class="form-group">
<label>Salary</label>
@Html.TextBoxFor(x => x.STAFF_SALARY, new { @class =
"form-control", @placeholder = "Salary" })
@Html.ValidationMessageFor(x => x.STAFF_SALARY, "",
new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.ActionLink("Back", "ShowStaffDetails", null, new
{ @class = "btn btn-outline-warning" })
<input type="submit" class="btn btn-outline-success
float-right" value="Update" />

1
</div>
</div>
</div>
</div>
</div>
</div>
}

UtilityController.cs
//importing files
using OnlinePaperWork_OPW_.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.Mvc;

//namespace to manage classes


namespace OnlinePaperWork_OPW_.Controllers
{
//utility class
public class UtilityController : Controller
{

//creating instance of database


private OnlinePaperWorkEntities db = new OnlinePaperWorkEntities();

//show raw material details action method http get


public ActionResult ShowRawMaterialDetails()
{

//sending raw material details to view from database


return View(db.tbl_RAW_MATERIAL.ToList().OrderByDescending(x =>
x.RAW_MATERIAL_ID));
}

//add raw material details action method http get


public ActionResult AddRawMaterialDetails()
{

//sending supplier details to view from database


List<tbl_SUPPLIER> supplierlist = db.tbl_SUPPLIER.ToList();
ViewBag.supplierListBag = new SelectList(supplierlist, "SUPPLIER_ID",
"SUPPLIER_NAME");
return View();
}

//add raw material details action method http post


[HttpPost]
public ActionResult AddRawMaterialDetails(tbl_RAW_MATERIAL material)
{

//adding raw material details in database

1
try
{
if (ModelState.IsValid)
{
tbl_RAW_MATERIAL rawMaterialDetails = new tbl_RAW_MATERIAL();
rawMaterialDetails.RAW_MATERIAL_NAME =
material.RAW_MATERIAL_NAME;
rawMaterialDetails.RAW_MATERIAL_QUANTITY =
material.RAW_MATERIAL_QUANTITY;
rawMaterialDetails.SUPPLIER_ID_FK = material.SUPPLIER_ID_FK;
db.tbl_RAW_MATERIAL.Add(rawMaterialDetails);
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Raw Material Details Added
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowRawMaterialDetails");
}

//update raw material details action method http get


public ActionResult UpdateRawMaterialDetails(int materialId)
{

//sending raw material details to view from database using material id


List<tbl_SUPPLIER> supplierlist = db.tbl_SUPPLIER.ToList();
ViewBag.supplierListBag = new SelectList(supplierlist, "SUPPLIER_ID",
"SUPPLIER_NAME");
return View(db.tbl_RAW_MATERIAL.Where(x => x.RAW_MATERIAL_ID ==
materialId).FirstOrDefault());
}

//update raw material details action method http post


[HttpPost]
public ActionResult UpdateRawMaterialDetails(tbl_RAW_MATERIAL rawMaterial)
{

//updating raw material details in database


try
{
if (ModelState.IsValid)
{
tbl_RAW_MATERIAL rawMaterialDetails =
db.tbl_RAW_MATERIAL.Where(x => x.SUPPLIER_ID_FK ==
rawMaterial.SUPPLIER_ID_FK).FirstOrDefault();
rawMaterialDetails.RAW_MATERIAL_NAME =
rawMaterial.RAW_MATERIAL_NAME;
rawMaterialDetails.RAW_MATERIAL_QUANTITY =
rawMaterial.RAW_MATERIAL_QUANTITY;
rawMaterialDetails.SUPPLIER_ID_FK =
rawMaterial.SUPPLIER_ID_FK;

1
db.Entry(rawMaterialDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Raw Material Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowRawMaterialDetails");
}

//delete raw material details action method http get


public ActionResult DeleteRawMaterialDetails(int materialId)
{

//deleting raw material details in database


try
{
tbl_RAW_MATERIAL rawMaterialDetails = db.tbl_RAW_MATERIAL.Where(x
=> x.RAW_MATERIAL_ID == materialId).FirstOrDefault();
db.Entry(rawMaterialDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Raw Material Details Deleted
Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowRawMaterialDetails");
}

//show supplier details action method http get


public ActionResult ShowSupplierDetails()
{

//sending supplier details to view from database


return View(db.tbl_SUPPLIER.ToList().OrderByDescending(x =>
x.SUPPLIER_ID));
}

//add supplier details action method http get


public ActionResult AddSupplierDetails()
{
return View();
}

//add supplier details action method http post


[HttpPost]
public ActionResult AddSupplierDetails(tbl_SUPPLIER supplier)
{

1
//adding supplier details in database
try
{
if (ModelState.IsValid)
{
tbl_SUPPLIER supplierDetails = new tbl_SUPPLIER();
supplierDetails.SUPPLIER_NAME = supplier.SUPPLIER_NAME;
supplierDetails.SUPPLIER_PHONE_NUMBER =
supplier.SUPPLIER_PHONE_NUMBER;
supplierDetails.SUPPLIER_SHOP_ADDRESS =
supplier.SUPPLIER_SHOP_ADDRESS;
db.tbl_SUPPLIER.Add(supplierDetails);
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Supplier Details Added
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowSupplierDetails");
}

//update supplier details action method http get


public ActionResult UpdateSupplierDetails(int supplierId)
{

//sending supplier details to view from database using supplier id


return View(db.tbl_SUPPLIER.Where(x => x.SUPPLIER_ID ==
supplierId).FirstOrDefault());
}

//update supplier details action method http post


[HttpPost]
public ActionResult UpdateSupplierDetails(tbl_SUPPLIER supplier)
{

//updating supplier details in database


try
{
if (ModelState.IsValid)
{
tbl_SUPPLIER supplierDetails = db.tbl_SUPPLIER.Where(x =>
x.SUPPLIER_ID == supplier.SUPPLIER_ID).FirstOrDefault();
supplierDetails.SUPPLIER_NAME = supplier.SUPPLIER_NAME;
supplierDetails.SUPPLIER_PHONE_NUMBER =
supplier.SUPPLIER_NAME;
supplierDetails.SUPPLIER_SHOP_ADDRESS =
supplier.SUPPLIER_SHOP_ADDRESS;
db.Entry(supplierDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();

2
TempData["Message"] = "Supplier Details Updated
Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowSupplierDetails");
}

//delete supplier details action method http get


public ActionResult DeleteSupplierDetails(int supplierId)
{

//deleting supplier details in database


try
{
tbl_SUPPLIER supplierDetails = db.tbl_SUPPLIER.Where(x =>
x.SUPPLIER_ID == supplierId).FirstOrDefault();
db.Entry(supplierDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Supplier Details Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowSupplierDetails");
}

//show staff details action method http get


public ActionResult ShowStaffDetails()
{

//sending staff details to view from database


return View(db.tbl_STAFF.ToList().OrderByDescending(x => x.STAFF_ID));
}

//add staff details action method http get


public ActionResult AddStaffDetails()
{
return View();
}

//add staff details action method http post


[HttpPost]
public ActionResult AddStaffDetails(tbl_STAFF staff)
{

//adding staff details in database


try
{
if (ModelState.IsValid)
{

2
tbl_STAFF staffDetails = new tbl_STAFF();
staffDetails.STAFF_NAME = staff.STAFF_NAME;
staffDetails.STAFF_PHONE_NO = staff.STAFF_PHONE_NO;
staffDetails.STAFF_ADDRESS = staff.STAFF_ADDRESS;
staffDetails.STAFF_DESIGNATION = staff.STAFF_DESIGNATION;
staffDetails.STAFF_SALARY = staff.STAFF_SALARY;
db.tbl_STAFF.Add(staffDetails);
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Staff Details Added Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowStaffDetails");
}

//update staff details action method http get


public ActionResult UpdateStaffDetails(int staffId)
{

//sending staff details to view from database using staff id


return View(db.tbl_STAFF.Where(x => x.STAFF_ID ==
staffId).FirstOrDefault());
}

//update staff details action method http post


[HttpPost]
public ActionResult UpdateStaffDetails(tbl_STAFF staff)
{

//updating staff details in database


try
{
if (ModelState.IsValid)
{
tbl_STAFF staffDetails = db.tbl_STAFF.Where(x => x.STAFF_ID ==
staff.STAFF_ID).FirstOrDefault();
staffDetails.STAFF_NAME = staff.STAFF_NAME;
staffDetails.STAFF_DESIGNATION = staff.STAFF_DESIGNATION;
staffDetails.STAFF_SALARY = staff.STAFF_SALARY;
staffDetails.STAFF_PHONE_NO = staff.STAFF_PHONE_NO;
staffDetails.STAFF_ADDRESS = staff.STAFF_ADDRESS;
db.Entry(staffDetails).State = EntityState.Modified;
db.SaveChanges();
ModelState.Clear();
TempData["Message"] = "Staff Details Updated Successfully...";
}
else
{
TempData["Message"] = "Error, Try Again Later...";
}
}

2
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowStaffDetails");
}

//show staff details action method http get


public ActionResult DeleteStaffDetails(int staffId)
{

//deleting staff details in database


try
{
tbl_STAFF staffDetails = db.tbl_STAFF.Where(x => x.STAFF_ID ==
staffId).FirstOrDefault();
db.Entry(staffDetails).State = EntityState.Deleted;
db.SaveChanges();
TempData["Message"] = "Staff Details Deleted Successfully...";
}
catch (Exception e)
{
TempData["Message"] = e.Message;
}
return RedirectToAction("ShowStaffDetails");
}
}
}

Models:-
Administrator:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_CATEGORY


{
public tbl_CATEGORY()
{
this.tbl_PRODUCT_CORNER = new HashSet<tbl_PRODUCT_CORNER>();
this.tbl_PRODUCT_PAGE = new HashSet<tbl_PRODUCT_PAGE>();
this.tbl_PRODUCT_PAPER_QUALITY = new
HashSet<tbl_PRODUCT_PAPER_QUALITY>();
this.tbl_PRODUCT = new HashSet<tbl_PRODUCT>();
this.tbl_PRODUCT_SIZE = new HashSet<tbl_PRODUCT_SIZE>();
}

public int CATEGORY_ID { get; set; }


[Required(ErrorMessage = "Enter Category Name")]
public string CATEGORY_NAME { get; set; }
[Required(ErrorMessage = "Select Image")]
public string CATEGORY_IMAGE { get; set; }

2
public virtual ICollection<tbl_PRODUCT_CORNER> tbl_PRODUCT_CORNER { get;
set; }
public virtual ICollection<tbl_PRODUCT_PAGE> tbl_PRODUCT_PAGE { get; set;
}
public virtual ICollection<tbl_PRODUCT_PAPER_QUALITY>
tbl_PRODUCT_PAPER_QUALITY { get; set; }
public virtual ICollection<tbl_PRODUCT> tbl_PRODUCT { get; set; }
public virtual ICollection<tbl_PRODUCT_SIZE> tbl_PRODUCT_SIZE { get; set;
}
}
}

Customer:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

public partial class tbl_CUSTOMER


{
public tbl_CUSTOMER()
{
this.tbl_FEEDBACK = new HashSet<tbl_FEEDBACK>();
this.tbl_ID_PROOF = new HashSet<tbl_ID_PROOF>();
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int CUSTOMER_ID { get; set; }


[Required(ErrorMessage = "Enter Login Id")]
[StringLength(50, MinimumLength = 3, ErrorMessage = "Enter Login Id
between 3 to 50 character")]
public string CUSTOMER_LOGIN_ID { get; set; }
[Required(ErrorMessage = "Enter Password")]
[DataType("Password")]
[StringLength(50, MinimumLength = 5, ErrorMessage = "Enter Password
between 5 to 50 character")]
public string CUSTOMER_PASSWORD { get; set; }
[Required(ErrorMessage = "Enter Confirm Password")]
[DataType("Password")]
[System.Web.Mvc.Compare("CUSTOMER_PASSWORD", ErrorMessage = "The password
and confirmation password do not match")]
public string CUSTOMER_CONFIRM_PASSWORD { get; set; }
[Required(ErrorMessage = "Enter Name")]
[RegularExpression(@"^[a-zA-Z ]+$", ErrorMessage = "Use Only Characters")]
[StringLength(30, MinimumLength = 3, ErrorMessage = "Enter Name between 3
to 50 character")]
public string CUSTOMER_NAME { get; set; }
[Required(ErrorMessage = "Enter Phone Number")]
[Range(10000000, 9999999999, ErrorMessage = "Enter Valid Phone Number")]
[Phone(ErrorMessage = "Enter Valid Phone Number")]
public string CUSTOMER_PHONE_NO { get; set; }
[Required(ErrorMessage = "Enter Email Id")]
[EmailAddress(ErrorMessage = "Enter Valid Email Id")]

2
[StringLength(50, MinimumLength = 10, ErrorMessage = "Enter Email id
between 10 to 50 character")]
public string CUSTOMER_EMAIL_ID { get; set; }
[Required(ErrorMessage = "Enter Address")]
[StringLength(150, MinimumLength = 15, ErrorMessage = "Enter Address
between 15 to 150 character")]
public string CUSTOMER_ADDRESS { get; set; }

public virtual ICollection<tbl_FEEDBACK> tbl_FEEDBACK { get; set; }


public virtual ICollection<tbl_ID_PROOF> tbl_ID_PROOF { get; set; }
public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER {
set; } get;
}
}

Category:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_CATEGORY


{
public tbl_CATEGORY()
{
this.tbl_PRODUCT_CORNER = new HashSet<tbl_PRODUCT_CORNER>();
this.tbl_PRODUCT_PAGE = new HashSet<tbl_PRODUCT_PAGE>();
this.tbl_PRODUCT_PAPER_QUALITY = new
HashSet<tbl_PRODUCT_PAPER_QUALITY>();
this.tbl_PRODUCT = new HashSet<tbl_PRODUCT>();
this.tbl_PRODUCT_SIZE = new HashSet<tbl_PRODUCT_SIZE>();
}

public int CATEGORY_ID { get; set; }


[Required(ErrorMessage = "Enter Category Name")]
public string CATEGORY_NAME { get; set; }
[Required(ErrorMessage = "Select Image")]
public string CATEGORY_IMAGE { get; set; }

public virtual ICollection<tbl_PRODUCT_CORNER> tbl_PRODUCT_CORNER { get;


set; }
public virtual ICollection<tbl_PRODUCT_PAGE> tbl_PRODUCT_PAGE { get; set;
}
public virtual ICollection<tbl_PRODUCT_PAPER_QUALITY>
tbl_PRODUCT_PAPER_QUALITY { get; set; }
public virtual ICollection<tbl_PRODUCT> tbl_PRODUCT { get; set; }
public virtual ICollection<tbl_PRODUCT_SIZE> tbl_PRODUCT_SIZE { get; set;
}
}
}

2
Product:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_PRODUCT


{
public tbl_PRODUCT()
{
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int PRODUCT_ID { get; set; }


[Required(ErrorMessage = "Enter Product Name")]
public string PRODUCT_NAME { get; set; }
[Required(ErrorMessage = "Enter Product Price")]
[RegularExpression("^[0-9]*$", ErrorMessage = "Price Must Be Number")]
public int PRODUCT_PRICE { get; set; }
[Required(ErrorMessage = "Enter Product Quantity")]
[RegularExpression("^[0-9]*$", ErrorMessage = "Product Quantity Must Be
Number")]
public int PRODUCT_QUANTITY { get; set; }
[Required(ErrorMessage = "Enter Product
Description")] public string PRODUCT_DESCRIPTION {
get; set; } public string PRODUCT_IMAGE { get; set; }
public bool PRODUCT_PAGE_DESIGN_REQUIRED { get; set; }
public bool PRODUCT_ID_PROOF_REQUIRED { get; set; }
[Required(ErrorMessage = "Select Category Name")]
public int PRODUCT_CATEGORY_ID_FK { get; set; }

public virtual tbl_CATEGORY tbl_CATEGORY { get; set; }


public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER { get;
set; }
}
}

Print Job Order:-


namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;

public partial class tbl_PRINT_JOB_ORDER


{
public tbl_PRINT_JOB_ORDER()
{
this.tbl_ID_PROOF = new HashSet<tbl_ID_PROOF>();
this.tbl_PAYMENT = new HashSet<tbl_PAYMENT>();
}

public int ORDER_ID { get; set; }


public int ORDER_PRODUCT_ID_FK { get; set; }
public int ORDER_CUSTOMER_ID_FK { get; set; }

2
public int ORDER_CORNER_ID_FK { get; set; }
public int ORDER_PAPER_QUALITY_ID_FK { get; set; }
public int ORDER_SIZE_ID_FK { get; set; }
public int ORDER_QUANTITY { get; set; }
public Nullable<int> ORDER_PAGE_ID_FK { get; set; }
public string ORDER_REFERENCE_IMAGE { get; set; }
public string ORDER_REFERENCE_PDF { get; set; }
public int ORDER_TOTAL_PRICE { get; set; }
public string ORDER_PAYMENT_TYPE { get;
set; } public string ORDER_STATUS { get; set;
} public string ORDER_DESCRIPTION { get; set;
}

public virtual tbl_CUSTOMER tbl_CUSTOMER { get; set; }


public virtual ICollection<tbl_ID_PROOF> tbl_ID_PROOF { get; set; }
public virtual ICollection<tbl_PAYMENT> tbl_PAYMENT { get; set; }
public virtual tbl_PRODUCT tbl_PRODUCT { get; set; }
public virtual tbl_PRODUCT_CORNER tbl_PRODUCT_CORNER { get; set; }
public virtual tbl_PRODUCT_PAPER_QUALITY tbl_PRODUCT_PAPER_QUALITY {
set; } get;

public virtual tbl_PRODUCT_SIZE tbl_PRODUCT_SIZE { get; set; }


} public virtual tbl_PRODUCT_PAGE tbl_PRODUCT_PAGE { get; set; }
}

Order Details Model:-


using System.ComponentModel.DataAnnotations;
using System.Web;

namespace OnlinePaperWork_OPW_.Models
{
public class OrderDetailsModel
{
public int CUSTOMER_ID { get; set; }
public string CUSTOMER_NAME { get; set;
}
public string CUSTOMER_PHONE_NO { get;
set; } public string CUSTOMER_EMAIL_ID
{ get; set; } public string CUSTOMER_ADDRESS
{ get; set; }

public int PRODUCT_ID { get; set; }


public string PRODUCT_NAME { get; set; }
public int PRODUCT_PRICE { get; set; }
public int PRODUCT_QUANTITY { get; set;
}
public string PRODUCT_DESCRIPTION { get; set; }
public string PRODUCT_IMAGE { get; set; }
public bool PRODUCT_PAGE_DESIGN_REQUIRED { get; set; }

[Required(ErrorMessage = "Select Corner")]


public int ORDER_CORNER_ID { get; set; }
[Required(ErrorMessage = "Select Size")]
public int ORDER_SIZE_ID { get; set; }
[Required(ErrorMessage = "Select Paper Quality")]
public int ORDER_PAPER_QUALITY_ID { get; set; }
public int ORDER_QUANTITY { get; set; }
[Required(ErrorMessage = "Select Page Design")]

2
public int? ORDER_PAGE_ID { get; set; }
[Required(ErrorMessage = "Enter Description")]
public string ORDER_DESCRIPTION { get; set; }

2
[RegularExpression(@"([a-zA-Z0-9\s_\\.\-:])+(.jpg|.JPG|.jpeg|.JPEG)$",
ErrorMessage = "Select Only Jpg Or Jpeg File Formet")]
public HttpPostedFileBase postIMAGE { get; set; }
[RegularExpression(@"([a-zA-Z0-9\s_\\.\-:])+(.pdf|.PDF)$", ErrorMessage
=
"Select Only Pdf File Formet")]
public HttpPostedFileBase postPDF { get; set; }
public string ORDER_REFERENCE_IMAGE { get; set; }
public string ORDER_REFERENCE_PDF { get; set; }

public string ORDER_CORNER_NAME { get; set; }


public string ORDER_SIZE_NAME { get; set; }
public string ORDER_PAPER_QUALITY_NAME { get; set; }
//public int ORDER_QUANTITY_NUMBER { get; set; }
public string ORDER_PAGE_NAME { get; set; }
public int ORDER_TOTAL_PRICE { get; set; }
public bool PRODUCT_ID_PROOF_REQUIRED { get; set; }
}
}

ID Proof:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web;

public partial class tbl_ID_PROOF


{
public int ID_PROOF_ID { get; set; }
public int ID_PROOF_CUSTOMER_ID_FK { get; set; }
public int ID_PROOF_ORDER_ID_FK { get; set; }
public string ID_PROOF_DOCUMENT_TYPE { get; set; }
public string ID_PROOF_IMAGE { get; set; }

public virtual tbl_CUSTOMER tbl_CUSTOMER { get; set; }


public virtual tbl_PRINT_JOB_ORDER tbl_PRINT_JOB_ORDER { get; set; }
}
}

Id Proof Model:-
using System.ComponentModel.DataAnnotations;
using System.Web;

namespace OnlinePaperWork_OPW_.Models
{
public class IdProofModel
{
public int ID_PROOF_ORDER_ID_FK { get; set; }
[Required(ErrorMessage = "Select Document Type")]
public string ID_PROOF_DOCUMENT_TYPE { get; set; }

[Required(ErrorMessage = "Select Document Image")]

2
[RegularExpression(@"([a-zA-Z0-9\s_\\.\-:])+(.jpg|.JPG|.jpeg|.JPEG)$",
ErrorMessage = "Select Only Jpg Or Jpeg File Formet")]
public HttpPostedFileBase postIMAGE { get; set; }
}
}

Payment:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;

public partial class tbl_PAYMENT


{
public int PAYMENT_ID { get; set; }
public int ORDER_ID_FK { get; set; }
public string PAYMENT_TYPE { get; set; }
public int PAYMENT_AMOUNT { get; set; }

public virtual tbl_PRINT_JOB_ORDER tbl_PRINT_JOB_ORDER { get; set; }


}
}

Corner:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_PRODUCT_CORNER


{
public tbl_PRODUCT_CORNER()
{
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int CORNER_ID { get; set; }


[Required(ErrorMessage = "Enter Corner Name")]
[RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Use Only Characters")]
public string CORNER_NAME { get; set; }
[Required(ErrorMessage = "Select Category")]
public int CORNER_CATEGORY_ID_FK { get; set; }

public virtual tbl_CATEGORY tbl_CATEGORY { get; set; }


public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER { get;
set; }
}
}

Paper Quality:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

2
public partial class tbl_PRODUCT_PAPER_QUALITY
{
public tbl_PRODUCT_PAPER_QUALITY()
{
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int PAPER_QUALITY_ID { get; set; }


[Required(ErrorMessage = "Enter Paper Quality")]
[RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Use Only Characters")]
public string PAPER_QUALITY_NAME { get; set; }
[Required(ErrorMessage = "Select Category")]
public int PAPER_QUALITY_CATEGORY_ID_FK { get; set; }

public virtual tbl_CATEGORY tbl_CATEGORY { get; set; }


public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER { get;
set; }
}
}

Size:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_PRODUCT_SIZE


{
public tbl_PRODUCT_SIZE()
{
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int SIZE_ID { get; set; }


[Required(ErrorMessage = "Enter Size")]
public string SIZE_NAME { get; set; }
[Required(ErrorMessage = "Select Category")]
public int SIZE_CATEGORY_ID_FK { get; set; }

public virtual tbl_CATEGORY tbl_CATEGORY { get; set; }


public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER { get;
set; }
}
}

Page:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_PRODUCT_PAGE


{

2
public tbl_PRODUCT_PAGE()
{
this.tbl_PRINT_JOB_ORDER = new HashSet<tbl_PRINT_JOB_ORDER>();
}

public int PAGE_ID { get; set; }


[Required(ErrorMessage = "Enter Page Name")]
[RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Use Only Characters")]
public string PAGE_NAME { get; set; }
[Required(ErrorMessage = "Select Category")]
public int PAGE_CATEGORY_ID_FK { get; set; }

public virtual tbl_CATEGORY tbl_CATEGORY { get; set; }


public virtual ICollection<tbl_PRINT_JOB_ORDER> tbl_PRINT_JOB_ORDER { get;
set; }
}
}

Supplier:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_SUPPLIER


{
public tbl_SUPPLIER()
{
this.tbl_RAW_MATERIAL = new HashSet<tbl_RAW_MATERIAL>();
}

public int SUPPLIER_ID { get; set; }


[Required(ErrorMessage = "Enter Supplier Name")]
[RegularExpression(@"^[a-zA-Z]+$", ErrorMessage = "Use Only Characters")]
public string SUPPLIER_NAME { get; set; }
[Required(ErrorMessage = "Enter Address")]
[StringLength(150, MinimumLength = 15, ErrorMessage = "Enter Adress
between 15 to 150 character")]
public string SUPPLIER_SHOP_ADDRESS { get; set; }
[Required(ErrorMessage = "Enter Phone Number")]
[Range(10000000, 9999999999, ErrorMessage = "Enter Valid Phone Number")]
[Phone(ErrorMessage = "Enter Valid Phone Number")]
public string SUPPLIER_PHONE_NUMBER { get; set; }

public virtual ICollection<tbl_RAW_MATERIAL> tbl_RAW_MATERIAL { get; set;


}
}
}

Raw Material:-
namespace OnlinePaperWork_OPW_.Models
{

2
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_RAW_MATERIAL


{
public int RAW_MATERIAL_ID { get; set; }
[Required(ErrorMessage = "Enter Material Name")]
public string RAW_MATERIAL_NAME { get; set; }
[Required(ErrorMessage = "Enter Material Quantity")]
public string RAW_MATERIAL_QUANTITY { get; set; }
[Required(ErrorMessage = "Select Supplier")]
public int SUPPLIER_ID_FK { get; set; }

public virtual tbl_SUPPLIER tbl_SUPPLIER { get; set; }


}
}

Staff:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_STAFF


{
public int STAFF_ID { get; set; }
[Required(ErrorMessage = "Enter Staff Name")]
[RegularExpression(@"^[a-zA-Z ]+$", ErrorMessage = "Use Only Characters")]
public string STAFF_NAME { get; set; }
[Required(ErrorMessage = "Enter Address")]
public string STAFF_ADDRESS { get; set; }
[Required(ErrorMessage = "Enter Phone Number")]
[Range(10000000, 9999999999, ErrorMessage = "Enter Valid Phone Number")]
[Phone(ErrorMessage = "Enter Valid Phone Number")]
public string STAFF_PHONE_NO { get; set; }
[Required(ErrorMessage = "Enter Designation")]
public string STAFF_DESIGNATION { get; set; }
[Required(ErrorMessage = "Enter Salary")]
[RegularExpression("^[0-9]*$", ErrorMessage = "Salary Must Be Number")]
public int STAFF_SALARY { get; set; }
}
}

Feedback:-
namespace OnlinePaperWork_OPW_.Models
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

public partial class tbl_FEEDBACK


{
public int FEEDBACK_ID { get; set; }

2
[Required(ErrorMessage = "Select Feedback Type")]
public string FEEDBACK_TYPE { get; set; }
[Required(ErrorMessage = "Enter Your Feedback
Message")]
[StringLength(150, MinimumLength = 20, ErrorMessage = "Enter Message
between 20 to 150 character")]
public string FEEDBACK_MESSAGE { get; set; }
public int FEEDBACK_CUSTOMER_ID_FK { get; set; }

public virtual tbl_CUSTOMER tbl_CUSTOMER { get; set; }


}
}

_ViewStart.cshtml:-

@{
var controller =
HttpContext.Current.Request.RequestContext.RouteData.Values["Controller"].ToString
();
string ShareLayout = null;
if (controller == "Customer")
{
ShareLayout = "~/Views/Shared/_LayoutCustomer.cshtml";
}
else
{
ShareLayout = "~/Views/Shared/_LayoutAdministrator.cshtml";
}
Layout = ShareLayout;
}

Web.config (For View):-


<?xml version="1.0"?>

<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor"
type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35">
<section name="host"
type="System.Web.WebPages.Razor.Configuration.HostSection,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages"
type="System.Web.WebPages.Razor.Configuration.RazorPagesSection,
System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>

<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc,
Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">

2
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
<add namespace="OnlinePaperWork_OPW_" />
</namespaces>
</pages>
</system.web.webPages.razor>

<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>

<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode"
type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>

Web.config (For Project):-


<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit
http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>

2
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"
/>
<bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"
/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="OnlinePaperWorkEntities"
connectionString="metadata=res://*/Models.OnlinePaperWorkModel.csdl|res://*/Models
.OnlinePaperWorkModel.ssdl|res://*/Models.OnlinePaperWorkModel.msl;provider=System
.Data.SqlClient;provider connection string=&quot;data source=.;initial
catalog=OnlinePaperWork;integrated
security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;"
providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory
type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory,
EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>

Packages.config:-
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="bootstrap" version="4.3.1" targetFramework="net45" />
<package id="EntityFramework" version="5.0.0" targetFramework="net45" />
<package id="jQuery" version="3.4.1" targetFramework="net45" />
<package id="jQuery.Validation" version="1.8.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.1"
targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45"
/>
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11"
targetFramework="net45" />

2
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0"
targetFramework="net45" />
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
<package id="popper.js" version="1.14.3" targetFramework="net45" />
<package id="Respond" version="1.2.0" targetFramework="net45" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages>

BundleConfig.cs
using System.Web.Optimization;

namespace OnlinePaperWork_OPW_
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.site.js",
"~/Scripts/jquery.validate.js",
"~/Scripts/jquery.validate.unobtrusive.js"))
;
bundles.Add(new
ScriptBundle("~/bundles/modernizr").Include( "~
/Scripts/modernizr-*"));

bundles.Add(new
ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));

bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}

Global.asax.cs:-
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;

namespace OnlinePaperWork_OPW_
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
2
}

2
AssemlyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following


// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OnlinePaperWork_OPW_")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OnlinePaperWork_OPW_")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to
COM
[assembly: Guid("969efd8c-8316-4bff-8858-f8914c26cd13")]

// Version information for an assembly consists of the following four values:


//
// Major Version
// Minor Version
// Build Number
// Revision
// You can specify all the values or you can default the Revision and Build
Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Site.css
.zoom:hover {
-ms-transform: scale(5); /* IE 9 */
-webkit-transform: scale(5); /* Safari 3-8 */
transform: scale(10);
}

.loader{
position: fixed;
left: 0px;
top: 0px;
width:100%;
height:100%;
z-index: 9999;
background: url('pageLoader.gif') 50% 50% no-repeat rgb(249,249,249);
}

2
Bootstrap.css

.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}

@media (min-width: 768px) {


.container {
max-width: 720px;
}
}

@media (min-width: 992px) {


.container {
max-width: 960px;
}
}

@media (min-width: 1200px) {


.container {
max-width: 1140px;
}
}

.container-fluid {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}

.row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}

.form-control-file{
display: block;
width: 100%;
}

.col-sm-3, .col-sm-4, .col-sm-6, .col-sm-12 {


position: relative;
width: 100%;

2
padding-right: 15px;
padding-left: 15px;
}

@media (min-width: 576px) {


.col-sm-3 {
-ms-flex: 0 0 25%;
flex: 0 0 25%;
max-width: 25%;
}
.col-sm-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.col-sm-6 {
-ms-flex: 0 0 50%;
flex: 0 0 50%;
max-width: 50%;
}
.col-sm-12 {
-ms-flex: 0 0 100%;
flex: 0 0 100%;
max-width: 100%;
}
}

.table {
width: 100%;
margin-bottom: 1rem;
color: #212529;
}

.table-dark {
color: #fff;
background-color: #343a40;
}

.table-bordered {
border: 1px solid #dee2e6;
}

.table-dark .table-striped tbody tr:nth-of-type(odd) {


background-color: rgba(255, 255, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {


background-color: rgba(0, 0, 0, 0.05);
}
.table-hover tbody tr:hover {
color: #212529;
background-color: rgba(0, 0, 0, 0.075);
}

.form-control {
display: block;
width: 100%;
height: calc(1.5em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;

2
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #495057;
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
.form-control {
transition: none;
}
}

.form-inline {
display: -ms-flexbox;
display: flex;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
-ms-flex-align: center;
align-items: center;
}

.form-inline .form-check {
width: 100%;
}

.form-group {
margin-bottom: 1rem;
}

.form-row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -5px;
margin-left: -5px;
}

.btn {
display: inline-block;
font-weight: 400;
color: #212529;
text-align: center;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: 0.25rem;

2
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-
color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-outline-primary {
color: #007bff;
border-color: #007bff;
}

.btn-outline-primary:hover {
color: #fff;
background-color: #007bff;
border-color: #007bff;
}

.btn-outline-success {
color: #28a745;
border-color: #28a745;
}

.btn-outline-success:hover {
color: #fff;
background-color: #28a745;
border-color: #28a745;
}

.btn-outline-info {
color: #17a2b8;
border-color: #17a2b8;
}

.btn-outline-info:hover {
color: #fff;
background-color: #17a2b8;
border-color: #17a2b8;
}

.btn-outline-warning {
color: #ffc107;
border-color: #ffc107;
}

.btn-outline-warning:hover {
color: #212529;
background-color: #ffc107;
border-color: #ffc107;
}

.btn-outline-danger {
color: #dc3545;
border-color: #dc3545;
}

.btn-outline-danger:hover {
color: #fff;
background-color: #dc3545;
border-color: #dc3545;

2
}

.btn-block {
display: block;
width: 100%;
}

.collapse:not(.show) {
display: none;
}

.dropdown-toggle {
white-space: nowrap;
}

.dropdown-toggle::after {
display: inline-block;
margin-left: 0.255em;
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid;
border-right: 0.3em solid transparent;
border-bottom: 0;
border-left: 0.3em solid transparent;
}

.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z- index:
1000; display:
none; float:
left;
min-width: 10rem;
padding: 0.5rem 0;
margin: 0.125rem 0 0;
font-size: 1rem;
color: #212529;
text-align: left;
list-style: none;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
}

.dropright .dropdown-toggle:empty::after {
margin-left: 0;
}

.dropright .dropdown-toggle::after {
vertical-align: 0;
}

.dropdown-divider {
height: 0;
margin: 0.5rem 0;
overflow: hidden;
border-top: 1px solid #e9ecef;

2
}

.dropdown-item {
display: block;
width: 100%;
padding: 0.25rem 1.5rem;
clear: both;
font-weight: 400;
color: #212529;
text-align: inherit;
white-space: nowrap;
background-color: transparent;
border: 0;
}

.dropdown-item:hover, .dropdown-item:focus {
color: #16181b;
text-decoration: none;
background-color: #f8f9fa;
}

.navbar {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 0.5rem 1rem;
}

.navbar-brand {
display: inline-block;
padding-top: 0.3125rem;
padding-bottom: 0.3125rem;
margin-right: 1rem;
font-size: 1.25rem;
line-height: inherit;
white-space: nowrap;
}

.navbar-brand:hover, .navbar-brand:focus {
text-decoration: none;
}

.navbar-nav {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
list-style: none;
}

2
.navbar-collapse {
-ms-flex-preferred-size: 100%;
flex-basis: 100%;
-ms-flex-positive: 1;
flex-grow: 1;
-ms-flex-align: center;
align-items: center;
}

.navbar-toggler {
padding: 0.25rem 0.75rem;
font-size: 1.25rem;
line-height: 1;
background-color: transparent;
border: 1px solid transparent;
border-radius: 0.25rem;
}
.navbar-toggler-icon {
display: inline-block;
width: 1.5em;
height: 1.5em;
vertical-align: middle;
content: "";
background: no-repeat center center;
background-size: 100% 100%;
}

@media (max-width: 991.98px) {


.navbar-expand-lg > .container,
.navbar-expand-lg > .container-fluid {
padding-right: 0;
padding-left: 0;
}
}

@media (min-width: 992px) {


.navbar-expand-lg {
-ms-flex-flow: row nowrap;
flex-flow: row nowrap;
-ms-flex-pack: start;
justify-content: flex-start;
}

.navbar-expand-lg .navbar-nav {
-ms-flex-direction: row;
flex-direction: row;
}

.navbar-expand-lg .navbar-nav .dropdown-menu {


position: absolute;
}
}

.navbar-dark .navbar-brand {
color: #fff;
}
.navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus {
color: #fff;
}

2
.navbar-dark .navbar-nav .nav-link {
color: rgba(255, 255, 255, 0.5);
}

.navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30'
xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)'
stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4
15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-dark .navbar-text {
color: rgba(255, 255, 255, 0.5);
}

.navbar-dark .navbar-text a {
color: #fff;
}

.navbar-dark .navbar-text a:hover, .navbar-dark .navbar-text a:focus {


color: #fff;
}

.card {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
}

.card-body {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1.25rem;
}

.card-header {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: rgba(0, 0, 0, 0.03);
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-img-top {
width: 100%;
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.text-white {
color: #fff !important;
}

2
.bg-info {
background-color: #17a2b8 !important;
}

.bg-light {
background-color: #f8f9fa !important;
}

.bg-dark {
background-color: #343a40 !important;
}

.border {
border: 1px solid #dee2e6 !important;
}

.text-danger {
color: #dc3545 !important;
}

.d-flex {
display: -ms-flexbox !important;
display: flex !important;
}

.justify-content-center {
-ms-flex-pack: center !important;
justify-content: center !important;
}

.float-left {
float: left !important;
}

.float-right {
float: right !important;
}

.p-2 {
padding: 0.5rem !important;
}

.mr-auto{
margin-right: auto !important;
}

.my-2 {
margin-bottom: 0.5rem !important;
}

.ml-1 {
margin-left: 0.25rem !important;
}

.mt-1{
margin-top: 0.25rem !important;
}

2
.mt-3{
margin-top: 1rem !important;
}

@media (min-width: 576px) {


.my-sm-0 {
margin-top: 0 !important;
}
.my-sm-0 {
margin-bottom: 0 !important;
}
}

@media (min-width: 992px) {


.my-lg-0 {
margin-top: 0 !important;
}
.my-lg-0 {
margin-bottom: 0 !important;
}
}

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

Jquery.site.js

function show(input) {
if (input.files && input.files[0]) {
var filerdr = new FileReader();
filerdr.onload = function (e) {
$('#the_img').attr('src', e.target.result);
}
filerdr.readAsDataURL(input.files[0]);
}
}

$(function () {
$('#urlFuntion').change(function () {
var url = $(this).val();
if (url != null && url != '') {
window.location.href = url;
}
});
});

$(function () {
$('#calculate').text("* " + $(selectedNumber).val() + " = " +
parseInt($('#price').html()) + " Pec");
});

$(function () {
$('#selectedNumber').change(function () {
var price = parseInt($
('#price').html()); var quantity = $
(selectedNumber).val(); if (quantity ==
null) {
quantity = 1;

2
}
else if (quantity < 1) {
quantity = 1;
}
else if (quantity > 10) {
quantity = 10;
}
$('#selectedNumber').val(quantity);
$('#calculate').text("* " + quantity + " = " + quantity * price + " Pec");
});
});

$(window).on('load', function () {
$('.loader').fadeOut("slow");
});

$(window).on('beforeunload', function () {
$('.loader').fadeIn(50);
});

2
3.5. TESTING
3.5.1. Test techniques and Testing Strategies used:-

Testing is a process of executing a program with the aim of finding error. To


make our software perform well it should be error free. If testing is done
successfully it will remove almost all the errors from the software.

Test Approaches:-

Test can be conducted based on two approaches –

 Functionality Testing
 Implementation Testing

When functionality is being tested without taking the actual implementation in


concern it is known as ‘black-box testing’. The other side is known as ‘white-
box testing’ where implemented code of the software is tested.

Black Box Testing:-

It is perform to test functionality of the program. It is also called ‘Behavioural’


testing. The tester in this case, has a set of input values and respective desired
results. On providing input, if the output matches with the desired results, the
program is tested ‘ok’, otherwise ‘error’.

White Box Testing:-

It is conducted to test program and its implementation, in order to improve code


efficiency or structure. It is also known as ‘Structural’ testing. In this testing
method, the code of the software is tested. This testing is done by programmers
of the software.

2
3.5.2. Test Cases:-

Customer Sign Up Test Cases:-


TEST TEST SCENARIO EXPECTED RESULTS ACTUAL RESULTS TEST
CASE ID PASS/FAIL

T01 Create an account with Customer should receive Customer recevied a Pass
valid data a message of account message successfully
successfully created as expected

T02 Create an account Customer should receive Customer received Pass


without filling data validation errors validation errors as
expected
T03 Create an account with Customer should receive Customer received Pass
already existed login id, validation error of “login validation errors as
phone no and email id id already exist”, “phone expected
(which should be no already exist” and
unique) “email id already exist”

T04 Create an account by Customer should receive Customer recevied a Pass


entering only one an validation error of validation errors as
character for login id or “enter login id between 3 expected
entering more than fifty to 50 character
character
T05 Create an account by Customer should receive Customer recevied a Pass
entering only one an validation error of validation errors as
character for password “enter password between expected
or entering more than 5 to 50 character
fifty character
T06 Create an account by Customer should receive Customer recevied a Pass
entering password and an validation error of validation errors as
confirm password “password and confirm expected
different password do not match”
T07 Create an account by Customer should receive Customer recevied a Pass
entering only one an validation error of validation errors as
character for name or “name must be between 3 expected
entering more than fifty to 50 character”
character
T08 Create an account by Customer should receive Customer recevied a Pass
entering numeric value an validation error of validation errors as
for name “use only characters” expected

T09 Create an account by Customer should receive Customer recevied a Pass


entering only one an validation error of validation errors as
numeric value or more “enter valid phone expected
than 10 value for phone number”
number or entering
character value

2
T10 Create an account by Customer should receive Customer recevied a Pass
entering only one an validation error of validation errors as
character or more than “enter valid email id” expected
50 character for email id
or entering invalid email
id
T11 Create an account by Customer should receive Customer recevied a Pass
entering only one an validation error of validation errors as
character or more “enter address between 15 expected
than to 150 character”
150 character for
address

Customer Login Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Check customer login Customer should login Customer loged in Pass
with valid login id successfully successfully as expected
and password

T02 Check customer login Customer should Customer received a Pass


with invalid login id and receive a error of error as expected
password “wrong user id or
password”
T03 Check customer login Customer should Customer received a Pass
with valid login id receive a error of error as expected
but invalid password “wrong user id or
password”
T04 Check customer login Customer should receive Customer received a Pass
with invalid login id but a error of “wrong user id error as expected
valid password or password”

T05 Check customer login Customer should receive Customer received Pass
without filling login id validation error of enter validation error as
and password login id and enter expected
password

T06 Check customer login Customer should receive Customer received a Pass
by entering only one a validation error of validation error as
character for login id or “login id must be expected
entering more than fifty between 3 to 50
character character”

T07 Check customer login Customer should receive Customer received a Pass
by entering only one a validation error of validation error as
character for password “password must be expected
or entering more than between 5 to 50
fifty character character”

2
Customer Booking Order Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Book order with Order should book Order booked Pass
selecting valid successfully successfully as expected
specification and
entering valid
details
T02 Book order without Customer should receive Customer received Pass
selecting valid validation error validation error as
specification or entering expected
valid details

T03 Book order without Order should book Order booked Pass
uploading any reference successfully successfully as expected
image or pdf document
(which is optional)

Customer Cancelling Booked Order Test Case:-


TEST TEST SCENARIO EXPECTED RESULTS ACTUAL RESULTS TEST
CASE ID PASS/FAIL

T01 Cancel Booked order by Customer should receive Customer received Pass
clicking cancel order a confirmation alert of confimation alert as
button “Are you sure you wish to expected
cancel this order”

T02 Cancel Booked order by Order status should Order status changed Pass
clicking cancel order changed from booked to successfully, cancel
button then selecting ok canceled, cancel order order disappeared and
button for confirmation button should disappear customer received
and customer should message as expected
receive message of
“Order canceled
successfully”

T03 Cancel Booked order by No changes should be No changes happened Pass


clicking cancel order happenens and and confirmation
button then selecting confirmation alert should alert goes off as
cancel button for goes off expected
confirmation

2
Customer Payment Test Case:-

TEST TEST SCENARIO EXPECTED RESULTS ACTUAL RESULTS TEST


CASE ID PASS/FAIL

T01 Select cash on delivery Customer should receive Customer received Pass
option from drop an messsage of “Payment message as expected
down list type recoreded”

T02 Select debit/credit card Customer should reach to Customer reached to Pass
option from drop down debit/credit card payment payment gate way
list and making page, after filling all the page, after filling all
payment with valid details, customer should details & pressing
details press payment button and payment button
a message pop up of customer received
“Payment has been done” message as expected

T03 Select debit/credit card Customer should reach to Customer reached to Pass
option from drop down debit/credit card payment payment gate way
list and making page, after filling all the page, after filling all
payment with invalid details, customer should details & pressing
details press payment button and payment button
should receive an error customer received
message “Invalid Details” message as expected

T04 Select Net Banking card Customer should reach to Customer reached to Pass
option from drop down net banking payment payment gate way
list and making page, after filling all the page, after filling all
payment with valid details, customer should details & pressing
details press payment button and payment button
a message should pop up customer received
of “Payment has been message as expected
done”
T04 Select Net Banking card Customer should reach to Customer reached to Pass
option from drop down net banking payment payment gate way
list and making page, after filling all the page, after filling all
payment with invalid details, customer should details & pressing
details press payment button and payment button
should receive an error customer received
message “Invalid Details” message as expected

2
Administrator Login Test Case :-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Check admin login with Admin should login Admin loged in Pass
valid login id and successfully successfully as expected
password

T02 Check admin login with Admin should receive a Admin received a error Pass
invalid login id and error of “wrong user id as expected
password or password”

T03 Check admin login with Admin should receive a Admin received a error Pass
valid login id but error of “wrong user id as expected
invalid password or password”

T04 Check admin login with Admin should receive a Admin received a error Pass
invalid login id but error of “wrong user id as expected
valid password or password”

T05 Check admin login Admin should receive Admin received Pass
without filling login id validation error of enter validation error as
and password login id and enter expected
password
T06 Check admin login by Admin should receive a Admin received a Pass
entering only one validation error of validation error as
character for login id or “login id must be expected
entering more than fifty between 3 to 50
character character”
T07 Check admin login by Admin should receive a Admin received a Pass
entering only one validation error of validation error as
character for password “password must be expected
or entering more than between 5 to 50
fifty character character”

Administrator Manage Category Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Create category with Category should be as expected Pass


valid data created and an message
should pop up of
“Category created
successfully”
T02 Create category with Admin should receive as expected Pass
invalid data an validation error

2
T03 Update category with Category should be as expected Pass
valid data updated and an message
should pop up of
“Category updated
successfully”
T04 Update category with Admin should receive as expected Pass
invalid data an validation error

T05 Delete category and Category should be as expected Pass


confirm by pressing ok deleted and an message
button should pop up of
“Category deleted
successfully”
T06 Delete category and Category should not be as expected Pass
confirm by pressing deleted and
cancel button confirmation box should
disappear

Administrator Manage Product Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Create product with Product should be as expected Pass


valid data created and an message
should pop up of “
Product created
successfully”
T02 Create product with Admin should receive a as expected Pass
invalid data validation error
T03 Update product with Product should be as expected Pass
valid data updated and an message
should pop up of “
Product updated
successfully”
T04 Update product with Admin should receive a as expected Pass
invalid data validation error

T05 Delete product and Product should be as expected Pass


confirm by pressing ok deleted and an message
button should pop up of “
Product deleted
successfully”

2
T06 Delete product and Product should not be as expected Pass
confirm by pressing deleted and
cancel button confirmation box should
disappear

Administrator Manage Specification Test Case:-


TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST
CASE ID RESULTS PASS/FAIL

T01 Add utility with valid Utility should be added as expected Pass
details and an message should
pop up of process
successfull
T02 Add utility with invalid Admin should received as expected Pass
details validation errors
T03 Update utility with valid Utility should be as expected Pass
details updated and an message
should pop up of
process successfull
T04 Update utility with Admin should received as expected Pass
invalid details validation errors
T05 Delete utility and Utility should be deleted as expected Pass
confirm by pressing ok and a message should
button pop up of process
successfull
T06 Delete utility and Utility should not be as expected Pass
confirm by pressing deleted and
cancel button confirmation box should
disappear

Administrator Manage Utility Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Add specification with Specification should be as expected Pass


valid details added and an message
should pop up of
process successfull
T02 Add specification with Admin should received as expected Pass
invalid details validation errors

2
T03 Update specification Specification should be as expected Pass
with valid details updated and an message
should pop up of
process successfull
T04 Update specification Admin should received as expected Pass
with invalid details validation errors
T05 Delete specification and Specification should be as expected Pass
confirm by pressing ok deleted and an message
button should pop up of
process successfull
T06 Delete specification and Specification should not as expected Pass
confirm by pressing be deleted and
cancel button confirmation box should
disappear

Administrator Manage Orders Test Case:-

TEST TEST SCENARIO EXPECTED ACTUAL RESULTS TEST


CASE ID RESULTS PASS/FAIL

T01 Reject printing Order should be rejeted as expected Pass


order (if any detail and an message should
is not valid) pop up of “ Order
rejected successfully”

T02 Change printing Status should change as expected Pass


order status and a message should
(if any detail is pop up of “ Status
not valid) changed successfully”

2
3.6. SECURITY MECHANISMS

In today’s world security is very important to insure the privacy, confidential


and unauthorized access of data. It can be harmful if someone access the data of
a person. In this project lot of security mechanisms need that no one can access data
of any other person.

Here ‘User id’ and ‘Password’ mechanism is used for login in the online
paper work (OPW). Every person use a different user id and password to access
the system. If a person have correct user id and password combination then it
can access the website otherwise it is not allowed to access.

The database of the system is second and most important part of the system
after the whole system, if system crashes or destroys later it can fix or create but
the data of the system if destroys it is very hard to recover, so it is an important
place where security has to be implemented to secure the date.

Here also ‘User id’ and ‘Password’ mechanism is needed to the secure server
side. Only authorized person can access the data by using their user id and
password which make the system’s privacy, confidentiality, integrity of data
and unauthorized access of the data.

2
8.6.1. Database/data security:-

8.6.2. Creation of user profile and access rights:-

Customer:-

2
Administrator:-

2
3.7. COST ESTIMATION OF THE PROJECT ALONG
WITH COST ESTIMATION MODEL

For any new software project, it is necessary to know how much it will cost to
develop and how much development time will it take. These estimates are
needed before development is initiated. Several estimation procedures have
been developed and are having the following attributes in common.

4. Project scope must be established in advanced.


5. Software metrics are used as a support from which evaluation is made.
6. The project is broken into small PCs which are estimated
individually. To achieve true cost & schedule estimate, several option
arise.
7. Delay estimation
8. Used symbol decomposition techniques to generate project cost
and schedule estimates.
9. Acquire one or more automated estimation tools.

Uses of Cost Estimation:


Activity Tasks involved
Planning Cost estimation, planning for training of manpower,
project scheduling and budgeting the project
Controlling Size metrics and schedule metrics help the manager to
keep control of the project during execution
Monitoring/improving Metrics are used to monitor progress of the project and
wherever possible sufficient resources are allocated to
improve.

Cost Estimation Model:

2
3.8. REPORT GENERATION

ONLINE PAPER WORK (OPW) will generate the following reports which
is given below:

4. CATEGORY REPORT: - List of all categories and their details will show
by this report.
5. PRODUCT REPORT: - This report contains the list of all the products
and their details.
6. PRINT JOB ORDER REPORT: - This report show the customer’s
booked orders.
7. ID PROOF REPORT: - Customers uploaded id proof show by this report.
8. PAYMENT REPORT: - Customer’s payment details will show by this
report.
9. FEEDBACK REPORT: - This report show the customers feedback.
10.CORNER REPORT: - Corner details show by this report.
11.PAPER QUALITY REPORT: - Paper quality details show by this
reports.
12.SIZE REPORT: - Size details show by this report.
13.PAGE DESIGN REPORT: - Page design details show by this
reports. 11.SUPPLIER REPORT: - This report show suppliers details.
14. RAW MATERIAL REPORT: - Raw material details will show by this
report.
15. STAFF REPORT: - All Staff’s details will show by this report.

2
Category Report:-

Products of single category (Magazine) Report:-

2
Products of single category (Visiting Card) Report:-

Products of single category (Text Box) Report:-

2
Printing Job Order Report:-

ID Proof Details Report:-

Payment Details Report:-

2
Feedback Details Report:-

Corner Details Report:-

Paper Quality Details Report:-

2
Size Details Report:-

Page Details Report:-

Supplier Details Report:-

2
Raw Material Details Report:-

Staff Details Report:-

2
3.9. FUTURE SCOPE

The system Online Paper Work (OPW) is developed for automate the
booking process of order for printing of paper products. This system not only save
time but also save the money of both parties the end users of the system and as
well as the business.

It is the law of nature, for living long time we need to adept new habits, rules
and technology and need update over self every time to time. For the long life
of this system we will also adept some new feature like more modules, more
testing phase, improving of graphics and design, reducing the code etc.

Online Paper Work (OPW) will adopt the following features in future for
enhancing the project:

 Implementing more security mechanism.


 Reusing and optimizing the codes.
 Implementing more testing.
 Adding more module.
 Making a backup system in the case of failure.
 Making distributed database system rather than centralized.
 Sending acknowledge to customer on mobile phone and email.

You might also like