Database em em code nhw sau: USE [master] GO IF EXISTS SELECT * FROM sysdatabases WHERE name='AUTOLOT' DROP DATABASE AUTOLOT SI2E=8192EB, MAXSIZE=2048GB, FILEGROWTH=65536KB WITH CATALOG
Trang 1
TRUONG DAI HOC QUOC TE HONG BANG
BO MON CONG NGHE THONG TIN
300
BAO CAO LAB
BAI THUC HANH PHAT TRIEN UNG DUNG WEB
Giảng viên hướng dẫn: Ths Hoàng Ngọc Long
Sinh viên thực hiện : Lê Danh Thưởng
Mã số sinh viên : 2111110611
TP Hồ Chí Minh, 2024
Trang 2
1P.HCM, ngày tháng Hăm
Người thực hiện
Trang 4
Phát triển ứng dụng Web MỤC LỤC
09 ce 96cm ẻ i NHAN XET CUA GIANG VIENLwcccescssssssseseesseseesssnesesssineecsnsnseeceanseeeeeseseesesunes ate ii
1H
Trang 5Phát triển ứng dụng Web
SOURCECODE:< ledanhthuong 2111110611 lap5.zip >
1.1 Kết quả thực hiện bai 1
Em Str dụng EntityFramework để làm bài
Database em em code nhw sau:
USE [master]
GO
IF EXISTS (SELECT * FROM sysdatabases WHERE name='AUTOLOT')
DROP DATABASE AUTOLOT
SI2E=8192EB, MAXSIZE=2048GB, FILEGROWTH=65536KB)
WITH CATALOG_COLLATION=DATABASE_ DEFAULT
GO
USE AUTOLOT
GO
CREATE TABLE dbo.Customers( CustID int IDENTITY(1,1) NOT NULL,
FirstName nvarchar(50) NULL, LastName nvarchar (50) NULL, PRIMARY KEY CLUSTERED
l
CustID ASC
CREATE TABLE dbo.Inventory( CarId int IDENTITY(1,1) NOT NULL,
Make nvarchar(50) NULL, Color nvarchar(50) NULL, PetName nvarchar(50) NULL, CONSTRAINT PK_INVENTORY PRIMARY KEY CLUSTERED
l
CarTd ASC
CREATE TABLE dbo.Orders ( OrderId int IDENTITY (1,1) NOT NULL,
CustID int NOT NULL, CarId int NOT NULL,
Trang 6
Phát triển ứng dụng Web PRIMARY KEY CLUSTERED
l
OrderTd ASC
ALTER TABLE dbo.Orders WITH CHECK ADD CONSTRAINT FK_ORDERS_CUSTOMERS
FOREIGN KEY (CustId) REFERENCES dbo.Customers (CustId)
ALTER TABLE dbo.Orders WITH CHECK ADD CONSTRAINT FK_Orders_Inventory
FOREIGN KEY (CarId) REFERENCES dbo.Inventory (Carld)
Trang 8Phát triển ứng dụng Web 1.1.1.Test case 1
Le Automotive Company introduc +
> Ơ % loalhoe7153 ar Oo Qa awwbiblearetorg @ Q Cowses|Pefec0yS @ tn mười CONexroler [Mf Overtine text with <ff Dashboard -sitena © Fillintheblankwith AL (POFIBAITAPTRAC @ Xac sust sit ret » oO
AUTOLOT Customer Inventory Order
Welcome to Our Automotive Company
Leading Innovations in the Automotive industry
Explore Our World
Discover the innovation behind our vehicles carvago
Choose your car a
Trang 9wwhibleclaretorg @ Q Courses |PerfectlyS @) Intro plan sign up| (3 New Folder Overline text with s <Ÿ Dashboard - _sitena filintheblankwith A\ (POF) BAI TAP TRAC @ Koc suất cốt rét
AUTOLOT Customer Inventory Order
Pat Walton
v | Create - AUTOLOT x +
€ >3 CG 23 localhost:7153/CustomerMaster/Create
ộ wwwbibleclaretorg = Courses | Perfectly S ® Intro plan sign up| P3 New Folder w Overline text with s 4 Dashboa
AUTOLOT Customer Inventory Order
Create
Firstname
Lastname
Trang 10
Phát triển ứng dụng Web
Edit - AUTOLOT x +
G *s localhost:7153/CustomerMaster/Edit?id=1
2ibleclaretorg #@ Courses|Perfectlys @ Intro plan signup| 3 NewrFoldar [¥ Overline text withs <2 Dashboard - sitena |
AUTOLOT Customer Inventory Order
Edit Customer
Firstname Dave Lastname Brenner Back to List
Trang 11
Phát triển ứng dụng Web
Delete - AUTOLOT x +
> Ơ 23 localhost:7153/CustomerMaster/Delete?id=1
v.bibleclaret.org @ O Courses | Perfectly S @ Intro plan sign up | [9 New Folder v Overline text with s 4
AUTOLOT Customer Inventory Order
wiww.bibleclaret.org @ O Courses | Perfectly S @ Intro plan signup | [New Folder w Overline text with s 4 Dashboard - _sitena
AUTOLOT Customer Inventory Order
Details
Customer
Firstname Dave Lastname Brenner
mm
10
Trang 12Phát triển ứng dụng Web
1.1.2 Test case 2
14 Index - AUTOLOT x +
Ơ 2 localhost7153/inventocymaster Qe O ww.bibleclretorg_ @ © Courses |PertectlyS @) Intro plansign up| CQ) New Folder [Wj Overlinetextwihs ff Dasnboard-sitena @ Fillin the blank with A (PDF) BAL TAP TRAC @@) Xác suất sốt rết »
AUTOLOT Customer Inventory Order
Bmw Black, Bimmer ma ma enw Green Hank m Ea Es enw Pink Pinky Ea ma
)LOT x +
localhost:7153/InventoryMaster/Create
@ O Courses | Perfectly S ® Intro plan sign up | (OQ New Folder v Overline text with s
AUTOLOT Customer Inventory Order
Trang 13Phát triển ứng dụng Web
ilhost:7153/InventoryMaster/Edit?id=1
© Courses | PerfectlyS @ Intro plan sign up| [1 NewFolder [9 Overline text withs << Dashboard
AUTOLOT Customer Inventory Order
Edit Inventory
Make
VN Color Black PetName Zipper
; - AUTOLOT x +
2s localhost:7153/InventoryMaster/Details?id=2
etorg @ Q Courses|PerfectlyS Ồ Intro plan signup| [2 NewFolder [W3 Overli
AUTOLOT Customer Inventory Order
Details
Make Ford
Color Rust PetName Rusty
mem
12
Trang 14Phát triển ứng dụng Web
e - AUTOLOT x 1
>s_ localhost:7153/InventoryMaster/Delete?id=1
iret.org @ = Q Courses | Perfectly S @ Intro plan sign up | (0 New Folder v Overline text withs <
AUTOLOT Customer Inventory Order
Are you sure you want to delete this?
Inventory
Make VN Color Black PetName Zipper
| peete Ï Back to List
13
Trang 15Phát triển ứng dụng Web
1.1.3.Test case 3
Index - AUTOLOT x +
Cc £3 localhost:7153/ordermaster abibleclaretorg @ Q Courses | PerfectlyS @) Intro plansignup| CQ NewFolder [J Overline textwiths <{f Dashboard -_sitena @ fillinthe blank with A (PC
AUTOLOT Customer Inventory Order Order
& www.ibleclaretorg @ OQ Courses |PerfectlyS @D Intro plansignup | CQ New Folder [¥ Overline text withs <J Das
AUTOLOT Customer Inventory Order
Are you sure you want to delete this?
Orders CustID 1 Carld 5
lÑ Back to List
1.2 Kết quả thực hiện bài 2
-em tao Entity Framework then update dir liéu cho razor page
-Em ste dung cdc class Nhw Credential va QLHC dé tao database Quanlyhanhchinh
Em tao có Các phương thức CRŨD cho Quản Lÿ Hành Chính
14
Trang 16@ Courses | Perfectly S ®@ Intro plan sign up | (9 New Folder w Overline text with s 4 Dashboard - _sitena Oo F
QUANLYHANHCHINH Home Privacy
Credential
FirstName
thuong
LastName ledanh
ledanhthuong0909@gmail.com Password
15
Trang 17Phát triển ứng dụng Web
1 Delete - AUTOLOT X | OS) (EF Gore) Gigi thigu Entity Fram = |- - QUANLYHANHCHINH x +
> CG *s localhost7016/quanlyhanhchinh/login oO awwbibledaretorg @ Q Courses | PertectyS @) Intro plan signup} CQ NewFolder [Wj Ovedineteeviths <{f Dashboard -_sitena © Fillin the blank with A (POF) BAI TAP TRAC
www.bibleclaretord @ Q Courses |PertectlyS @ intro plan signup | ( New Folder (Oxefline text uith s <{f Dasnboard - sitena @ Fillin the blank with AL (POF) BAI TAP TRAC “Xác suất sốt tét »
QUANLYHANHCHINH Home Privacy
Phiếu nghĩ đã duyệt Phiếu nghỉ mới
Previous 1 3 Next Phiếu dang chữ duyêt
2 @ O Courses) Perectys @ intro plansignup| [CQ NewFokder [Wj Overtine tex withs <ff Dashboard -_sitena @ Fillinthe blank with A (POF) BAI TAP TRAC Xác suất sết rét
QUANLYHANHCHINH Home Privacy
8 ROMONCONGNGHETHONGTN =
QUAN LY HANH CHINH
IT langchủ Phòngban Chứcvu NhânViên NgàyPhép Phiểunghỉ Thoát QLHC
TenNhanVien
Le Danh Thuong PhongBan
it
SoNgay
30
TuNgay 04/06/2024 12:52 PM 6 DenNgay
05/04/2024 12:52 PM a
16
Trang 18DenNaay mevddiyyyy — o
1 | Le Danh Thuong it 30
© New Folder [# Overiine text with s
Ngày Phép Phiếu nghỉ Theát
eclaretorg @ Q Cowsas|PerfetlyS } Into plan sign up |
3 © New Foker [#j Ovedine text uith s
<f Dashboard - _sitena
QUAN LY HANH CHINH
© Fill in the blank with
Trang chú Phòng ban Chức vụ Nhân Viên Ngày Phép Phiếu nghỉ Thoát
Adm Phiếu đang chờ duyes Tao mới phiếu oohï
Số ngày nghĩ phép Vv
\ Tạo phiếu nghĩ
Phiếu nghĩ đã duyệt Phiếu nghĩ mới
Trang 19waw.bibledaretorg @ Courses|PertectlyS @) Intro plansign up| CJ New Folder [§ Overtine text with s <ƒ Dashboad - sitena @ Fillin the blank with AL (POF) BAI TAP TRAC, Xác suất sết tết »
QUANLYHANHCHINH Heme Privacy
QUAN LY HANH CHINH
Tang€hì Phongban Chứcv NhânViên NgàyPhép Phigunghi Thoát pam Phiếu đang, chờ duyệt Tao mới phiếu nhí
QUANLYHANHCHINH Home Prvacy
TT Tíangchủ Phénghan ChửcvA NhânViên NgâyPhép Phiếunghỉ Thoát
QLHC
TeNhanVien:
PhongBan SoNgay
TuNgay
tmm/6đ/Jyyy —:~- o
DenNgzy mm/đ9/yyyy ~:— a
1.3 Kết quả thực hiện bài 3
Em Sử dung razor pages đề thực hiện và tạo database
18
Trang 20RecipeApplication Home Privacy Create Recipe
Name nau com Method
<
Time to Cookihrs}
Time to cook (mins)
10 Bvegeranian?
GVegan?
Ingredient Quantity Gao †
1.3.2 Test case 2
V - lẺ tdex-Redpeppicaton x +
€ > Ơ * loalhost7!40/8edpesl?id=4
ộ, wwwbitleclaretorg @ OCoselresety5 @ Intro pian sign vot
RecipeApplication Home Privacy
Index
J Dashbosrd
© New Folder [W Overtine text with s ff Dasnvoard -_stena
sitens @ fillin the blank with
nau com (02100 cooking2 Ect | Desails | Delete
19
Trang 21Phát triển ứng dụng Web
QO Courses | Perfectly S @ Intro plan sign up | (0 New Folder v Ovel
RecipeApplication Home Privacy
Trang 22Phát triển ứng dụng Web
G *s localhost:7140/Recipes1/Delete?id=3
eclaret.org @ O Courses | Perfectly S @Q) Intro plansignup| CQ New Folder [WÌ Ovetlinetextwiths <Ÿ Dashboar
RecipeApplication Home Privacy
Delete
Are you sure you want to delete this?
Recipe
Name thuong TimeToCook 02:00:00 IsDeleted
Method cooking IsVegetarian
IsVegan UIT | 2ack :o List
KẾT LUẬN
~ _Siiena OF
Em d& hoc duoc cach sw dung razor pages va thao tac voi service cung nhw Model trong razor page
Em cung bat dau làm quen với Layout trong Razorpage
Cững sử dụng các phương thức post and get o trong razor page
21