Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lesson49
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Пасько Виталий
Lesson49
Commits
fcbec971
Commit
fcbec971
authored
Aug 14, 2022
by
Пасько Виталий
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: поправил стили для отображения телефонов.
parent
e6df9e62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
PhonesController.cs
PhoneStore/Controllers/PhonesController.cs
+1
-2
Index.cshtml
PhoneStore/Views/Phones/Index.cshtml
+1
-1
site.css
PhoneStore/wwwroot/css/site.css
+3
-0
No files found.
PhoneStore/Controllers/PhonesController.cs
View file @
fcbec971
...
...
@@ -96,10 +96,9 @@ namespace PhoneStore.Controllers
//TODO: Добавить удаление файла изображения.
var
phone
=
_db
.
Phones
.
FirstOrDefault
(
p
=>
p
.
Id
==
phoneId
);
if
(
phone
is
null
)
return
BadRequest
(
);
return
RedirectToAction
(
"Error"
,
"Errors"
,
new
{
statusCode
=
777
}
);
_db
.
Phones
.
Remove
(
phone
);
_db
.
SaveChanges
();
return
RedirectToAction
(
"Index"
);
}
...
...
PhoneStore/Views/Phones/Index.cshtml
View file @
fcbec971
...
...
@@ -33,7 +33,7 @@ else
@foreach (var phone in Model.Phones)
{
<tr>
<td
><img class="phone_img
" src="@phone.Image" alt="картинка паламатая"/></td>
<td
class="w_15 pr-2"><img class="phone_img w-100
" src="@phone.Image" alt="картинка паламатая"/></td>
<td>@phone.Name</td>
<td>@phone.Brand.Name</td>
<td>@phone.Price</td>
...
...
PhoneStore/wwwroot/css/site.css
View file @
fcbec971
...
...
@@ -74,3 +74,6 @@ body {
background-color
:
#6f42c1
;
border-color
:
#6f42c1
;
}
.w_15
{
width
:
15%
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment