MvcBookStore/Views/StoreManage/Index.cshtml

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@model IEnumerable<MvcBookStore.Models.Books>
@helper Truncate (string input,  int length)
{
    if (input.Length <=length)
    {
        @input 
    }
    else
    {
        @input.Substring(0,length ) <text>...</text>
   }
}




@{
    ViewBag.Title = "图书管理";
}

<h2>图书管理</h2>

<p>
    @Html.ActionLink("新建图书", "Create")
</p>
<table>
    <tr>
      
        <th>
            图书类别
        </th>
        <th>
           书名
        </th>
        <th>
           单价
        </th>
       
        <th>
           作者
        </th>
        
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Categories.Name )
        </td>
        
        <td>
            @Truncate(item .Title,20)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
                                                                   
        <td>
            @Truncate(item .Authors ,10)
后面还有 11 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。