1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using CZFW.Framework.Model.ViewModel;
- using CZFW.Framework.WebApi;
- using CZKJ.GBRS2.Entity;
- using CZKJ.GBRS2.Interface;
- using Microsoft.AspNetCore.Mvc;
- namespace CZKJ.GBRS2.Web.Areas.Manage.Controllers
- {
- public class PriceAnnouncementController : ApiControllerBase<PriceAnnouncementEntity>
- {
- private IPriceAnnouncement _priceAnnouncementLogic;
- public PriceAnnouncementController(IPriceAnnouncement priceAnnouncementLogic)
- {
- _baseLogic = _priceAnnouncementLogic = priceAnnouncementLogic;
- }
- public TableModel<PriceAnnouncementEntity> GetTableModel(int? typeId, int pageIndex = 1, int pageSize = 20)
- {
- int rowsCount = 0;
- var model = new TableModel<PriceAnnouncementEntity>();
- var data = _priceAnnouncementLogic.GetTableList(typeId,pageIndex,pageSize,out rowsCount);
- model.SetData(data);
- model.Pager = new PagerModel(rowsCount, pageIndex, pageSize);
- model.TableHeads = PropertyHelper.Get(typeof(PriceAnnouncementEntity));
- return model;
- }
- }
- }
|