62,046
社区成员
发帖
与我相关
我的任务
分享
model.LogList = dtos.Select(obj => new BuyLogModel()
{
BuyDate = obj.BuyDate,
BuyID = obj.BuyID,
BuyNum = obj.BuyNum,
ChildItemID = obj.ChildItemID,
Color = obj.Color,
Price = obj.Price,
SpecTitle = obj.SpecTitle,
SpecValue = obj.SpecValue,
UserID = obj.UserID,
UserName = string.Empty
}).OrderByDescending(t=>t.BuyDate).ToPagedList(index??1,15);
if (Request.IsAjaxRequest())
return PartialView("UCSellLogList",model.LogList);
public class DetailModel
{
public Guid ID { get; set; }
public string Img { get; set; }
public string Title { get; set; }
public string Summary { get; set; }
public string Desc { get; set; }
public int RestDay { get; set; }
public decimal TotalPrice { get; set; }
public int Percentage { get; set; }
public string ShopUrl { get; set; }
public int? AppearanceStore { get; set; }
public int? FunctionStore { get; set; }
public int? PriceStore { get; set; }
public int? TotalStore { get; set; }
public string ReviewDesc { get; set; }
public DateTime? EndDate { get; set; }
public List<UserModel> UserList { get; set; }
public PagedList<BuyLogModel> LogList { get; set; }
public PagedList<ReviewListModel> ReviewList { get; set; }
public List<KeyValue<string,Specs>> SpecsArray { get; set; }
public List<ChildItemDTO> Items { get; set; }
}
public class BuyLogModel
{
public Guid? UserID { get; set; }
public string UserName { get; set; }
public Guid? ChildItemID { get; set; }
public int? BuyNum { get; set; }
public decimal? Price { get; set; }
public Guid BuyID { get; set; }
public DateTime? BuyDate { get; set; }
public string SpecTitle { get; set; }
public string SpecValue { get; set; }
public string Color { get; set; }
}
@model PagedList<YCZ.Sites.Models.BuyLogModel>
<dl class="del_cjjl">
<dt class="com_of">
<span>购买者</span>
<span>数量</span>
<span>价格</span>
<span>购买日期</span>
<span class="last">规格/颜色</span>
</dt>
@foreach (var item in Model)
{
<dd class="com_of">
<span>@item.UserName</span>
<span class="num">@item.BuyNum</span>
<span class="num colorf40">@item.Price</span>
<span class="date">
@if (item.BuyDate.HasValue)
{
<label>@item.BuyDate.Value.ToString("yyyy-MM-dd")</label>
}
</span>
<span class="last">
<label>@item.SpecValue</label>/ @if (item.Color != null)
{<label>@item.Color</label>}
else
{<label>无</label>}</span>
</dd>
}
</dl>
<div id="dlBuyLogs">
@{Html.RenderPartial("UCSellLogList", Model.LogList);}
@Ajax.Pager(Model.LogList,
new PagerOptions { PageIndexParameterName = "index", ShowPageIndexBox = true, PageIndexBoxType = PageIndexBoxType.DropDownList,ShowGoButton = false},
new MvcAjaxOptions{UpdateTargetId="dlBuyLogs",EnablePartialLoading = true},null)
</div>
if (Request.IsAjaxRequest())
return PartialView("UCSellLogList",model.LogList);
这里一直都没执行
<script src="/Scripts/jquery-1.8.2.min.js"></script> //这个在模板页引用的
<script src="@Url.Content("/Scripts/jquery.unobtrusive-ajax.min.js")"></script> //这个在view页面引用的