public MeeTingContext MeeTingContext;
public MeetingController(MeeTingContext meeTingContext)
{
MeeTingContext = meeTingContext;
}
//显示
public async Task<Object> Show(int pagenumber)
{
var st = (from s in MeeTingContext.Matnr
join p in MeeTingContext.Material on s.MaterialType equals p.MaterialTypeId
select new BTL.Zuzhangyitianzuowanxiangmu
{
MATNRBian = s.MATNRBian,
NameMaterial = s.NameMaterial,
MaterialType = s.MaterialType,
MaterialTypeId = p.MaterialTypeId,
MaterialTypeName = p.MaterialTypeName,
Price = s.Price,
StockQty = s.StockQty,
Balance = s.Balance,
Added = s.Added,
Matnrid = s.Matnrid,
ure=s.ure==true
}).ToList();
var sed = st.Count;
return await Task.Run(() => { return new { st = st.Skip((pagenumber - 1) * 2).Take(8).ToList(), count = Math.Ceiling((double)st.Count / 2) > 0 ? Math.Ceiling((double)st.Count / 2) : 1 }; }); ;
}