@using FHT.Agency.UI.InputModels.Search @using FHT.Utilities @using FHT.Agency.CommonTypes @using FHT.Notifications.Interfaces @using MvcPaging @model SearchBroadcastNoticeInputModel @{ ViewBag.Title = "运营手动通知列表"; Layout = "~/Views/Shared/_Layout.cshtml"; FHT.DDD.QueryResult broadcastNotifications=new FHT.DDD.QueryResult(); FHT.DDD.QueryResult notifications = new FHT.DDD.QueryResult(); if (Model.TargetType== OperationType.Broadcast) { broadcastNotifications = (FHT.DDD.QueryResult)ViewBag.Notifications; } else { notifications = (FHT.DDD.QueryResult)ViewBag.Notifications; } }
@using (Html.BeginForm("CoreNotifications", "Notification", FormMethod.Get, new { role = "form" })) {
@Html.RequiredLabelFor(m => m.Title, new{@class="pull-left fht-control-label"})
@Html.TextBoxFor(m => m.Title, new { @class = "form-control", style = "width:100%" })
@Html.RequiredLabelFor(m => m.TargetType, new{@class="pull-left fht-control-label"})
@Html.EditorFor(m => m.TargetType, new { @class = "form-control", style = "width:100%" })
@Html.RequiredLabelFor(m => m.NotificationType, new{@class="pull-left fht-control-label"})
@Html.EditorFor(m => m.NotificationType, new { enumSource = typeof(OperationNotificationType) })
}
@if (Model.TargetType == OperationType.Specific) { } @if (Model.TargetType == OperationType.Broadcast) { if (broadcastNotifications.Data.Any()) { foreach (var n in broadcastNotifications.Data) { } } else { } } else { if (notifications.Data.Any()) { foreach (var n in notifications.Data) { } } else { } }
编号 类型目标标题 内容 发送日期
@n.NotificationId @n.NotificationType.GetEnumDescription() @n.Title @n.Content.CutStr(30) @n.CreatedTime
暂无数据
@n.NotificationId @n.NotificationType.GetEnumDescription() @(!string.IsNullOrEmpty( n.TargetName)? n.TargetName: "/") @n.Extention.Title @n.Extention.Content.CutStr(30) @n.Created
暂无数据
@if ((notifications.TotalCount - 1) / Model.Limit >= 1) { @Html.Pager(Model.Limit, Model.CurrPage, (int)notifications.TotalCount).Options(opt => { opt.Action("CoreNotifications") .PageRouteValueKey("CurrPage") .AddRouteValue("Title", Model.Title) .AddRouteValue("NotificationType", Model.NotificationType) .AddRouteValue("TargetType", Model.TargetType.ToInt()) .SetNextPageText(">") .DisplayTemplate("BootstrapPagination") .SetPreviousPageText("<"); }) }
@section scripts { @Scripts.Render("~/bundles/views/notification/coreSend") }