using Microsoft.AspNetCore.Mvc;
using Nirvana.Common;
using System.Collections.Generic;
using System.Threading.Tasks;
using YBDevice.Application;
using YBDevice.Application.ViewInfo;
using YBDevice.Entity;

namespace YBDevice.NWeb.Pages.OutProduct
{
    public class IndexModel : BaseModel
    {
        public List<YB_Business> businesslist = new List<YB_Business>();
        public List<YB_DeviceType> types = new List<YB_DeviceType>();
        private IBusinessService _businessService;
        private IViewEngineService _viewEngineService;
        private IDeviceService _deviceService;
        public ViewS2SDto viewdata = new ViewS2SDto();
        public IndexModel(IBusinessService businessService, IViewEngineService viewEngineService,IDeviceService deviceService)
        {
            _businessService = businessService;
            _viewEngineService = viewEngineService;
            _deviceService = deviceService;
        }
        public async Task OnGetAsync()
        {
            businesslist = await _businessService.GetAllListAsync(1);
            types = await _deviceService.GetTypeListAsync();
            viewdata = await _viewEngineService.GetBtnListAsync();
        }
    }
}
