Skip to content

Commit

Permalink
removed old home controller
Browse files Browse the repository at this point in the history
fixed status erasing after edit
  • Loading branch information
rumkit committed Feb 19, 2019
1 parent 54d03d4 commit 1222655
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 46 deletions.
29 changes: 0 additions & 29 deletions Controllers/HomeController.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Controllers/PhoneBookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public async Task<IActionResult> Edit(int? id)
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,PersonnelNumber,Name,Position,Department,LocalPhoneNumber,CityPhoneNumber,Mail,Room")] BookEntry bookEntry)
public async Task<IActionResult> Edit(int id, [Bind("Id,PersonnelNumber,Name,Position,Department,LocalPhoneNumber,CityPhoneNumber,Mail,Room, Status")] BookEntry bookEntry)
{
if (id != bookEntry.Id)
{
Expand Down
4 changes: 2 additions & 2 deletions Data/SampleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public static async Task CreateDefaultUser(IServiceProvider serviceProvider)
{
var adminUser = new IdentityUser()
{
UserName = "[email protected]",
Email = "[email protected]",
UserName = "[email protected]",
Email = "[email protected]",
EmailConfirmed = true
};

Expand Down
8 changes: 0 additions & 8 deletions Views/Home/Index.cshtml

This file was deleted.

6 changes: 0 additions & 6 deletions Views/Home/Privacy.cshtml

This file was deleted.

1 change: 1 addition & 0 deletions Views/PhoneBook/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<input type="hidden" asp-for="Status" />
<div class="form-group">
<label asp-for="PersonnelNumber" class="control-label"></label>
<input asp-for="PersonnelNumber" class="form-control" />
Expand Down

0 comments on commit 1222655

Please sign in to comment.