1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using CZFW.Framework.Interface;
- using CZKJ.GBRS2.Interface;
- using CZKJ.GBRS2.WebMVC.Models;
- using Microsoft.AspNetCore.Mvc;
- namespace CZKJ.GBRS2.WebMVC.Controllers
- {
- public class PriceAnnouncementController : Controller
- {
- private readonly IPriceAnnouncement _priceAnnouncementLgoic;
- private readonly IGallery _galleryLogic;
- private readonly IType _typeLogic;
- public PriceAnnouncementController(IPriceAnnouncement priceAnnouncementLogic, IGallery galleryLogic, IType typeLogic)
- {
- _priceAnnouncementLgoic = priceAnnouncementLogic;
- _galleryLogic = galleryLogic;
- _typeLogic = typeLogic;
- }
- public IActionResult Index(int typeId, DateTime? startTime, DateTime? endTime, int pageIndex = 1, int pageSize = 20)
- {
- var model = new PriceAnnouncementIndexModel();
- int rowsCount;
- model.Banner = _galleryLogic.GetGallery(172) ?? new CZFW.Framework.Model.Entity.GalleryEntity(); ;
- model.TypeList = _typeLogic.GetListByParentId(169);
- model.List = _priceAnnouncementLgoic.GetList(typeId, startTime, endTime, pageIndex, pageSize, out rowsCount);
- model.TypeId = typeId;
- model.StartTime = startTime;
- model.EndTime = endTime;
- model.PageIndex = pageIndex;
- model.PageSize = pageSize;
- model.RowsCount = rowsCount;
- model.MaxYear = _priceAnnouncementLgoic.GetMaxYear();
- model.MinYear = _priceAnnouncementLgoic.GetMinYear();
- return View(model);
- }
- }
- }
|