领导信箱增加收信人显示
领导信箱【公开信访列表.cshtml】,若提交写信时时选择了写信人,前台列表增加收件人显示,效果如下:
复制标签【公开信访列表.cshtml】,进行修改,代码修改如下:
注入前:
@inject PetitionLetterService PetitionLetterService
@inject GlobalDepartmentService GlobalDepartmentService
@inject PetitionLetterBoxService PetitionLetterBoxService
注入后:
@inject PetitionLetterService PetitionLetterService
@inject GlobalDepartmentService GlobalDepartmentService
@inject PetitionLetterBoxService PetitionLetterBoxService
@inject AddresseeService AddresseeService
变量前:
count++;
var className = "";
var department = GlobalDepartmentService.GetEntity(n => n.DepartmentId == publicity.PetitionDepartmentId);
变量后:
count++;
var className = "";
var department = GlobalDepartmentService.GetEntity(n => n.DepartmentId == publicity.PetitionDepartmentId);
var addressee = AddresseeService.GetEntity(x => x.AddresseeId == publicity.AddresseeId);
标题结构:
<
td
class
=
"title"
>
@if (addressee != null)
{
<
span
class
=
"addressee"
>@addressee.AddresseeName</
span
>
}
<
a
href
=
"@Url.Action("
Details", "home", new { id = publicity.PetitionLetterId, area = "Petition" })">
@publicity.Title.CutText(TitleLength, "…")
</
a
>
</
td
>
用户登录
还没有账号?
立即注册