Ignore:
Timestamp:
08/29/24 20:27:21 (4 weeks ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
99d0ecc
Parents:
a850333
Message:

fix issues

fix bugs with nested tables
fix delete nested fk items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Views/PetCares/Index.cshtml

    ra850333 re90ba32  
    3131            @Html.DisplayNameFor(model => model.vetcentersid)
    3232        </th>
     33        <th>
     34            @Html.DisplayNameFor(model => model.PetsClass.name)
     35        </th>
    3336
    3437        <th></th>
     
    3639    </tr>
    3740
    38 @foreach (var item in Model) {
    39     <tr>
    40         <td>
    41             @Html.DisplayFor(modelItem => item.title)
    42         </td>
    43         <td>
    44             @Html.DisplayFor(modelItem => item.description)
    45         </td>
    46         <td>
    47             @Html.DisplayFor(modelItem => item.dateending)
    48         </td>
     41    @foreach (var item in Model)
     42    {
     43        <tr>
     44            <td>
     45                @Html.DisplayFor(modelItem => item.title)
     46            </td>
     47            <td>
     48                @Html.DisplayFor(modelItem => item.description)
     49            </td>
     50            <td>
     51                @Html.DisplayFor(modelItem => item.dateending)
     52            </td>
    4953            <td>
    5054                @Html.DisplayFor(modelItem => item.start_date)
    5155            </td>
    52         <td>
    53             @Html.DisplayFor(modelItem => item.usersid)
    54         </td>
    55         <td>
    56             @Html.DisplayFor(modelItem => item.vetcentersid)
    57         </td>
     56            <td>
     57                @Html.DisplayFor(modelItem => item.usersid)
     58            </td>
     59            <td>
     60                @Html.DisplayFor(modelItem => item.vetcentersid)
     61            </td>
     62            <td>
     63                @Html.DisplayFor(modelItem => item.PetsClass.name)
     64            </td>
    5865
    5966
    6067
    61         <td>
    62             @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
    63             @Html.ActionLink("Details", "Details", new { id = item.id }) |
    64             @Html.ActionLink("Delete", "Delete", new { id = item.id })
    65         </td>
    66     </tr>
    67 }
     68            <td>
     69                @Html.ActionLink("Edit", "Edit", new { id = item.id }) |
     70                @Html.ActionLink("Details", "Details", new { id = item.id }) |
     71                @Html.ActionLink("Delete", "Delete", new { id = item.id })
     72            </td>
     73        </tr>
     74    }
    6875
    6976</table>
Note: See TracChangeset for help on using the changeset viewer.