示例#1
0
        // GET: SupplierController
        public ActionResult Index()
        {
            var suppliers = _repo.FindAll().ToList();
            var model     = _mapper.Map <List <Supplier>, List <SupplierVM> >(suppliers);

            return(View(model));
        }
示例#2
0
        public ChartFilteringDTO FilteringByAttributes()
        {
            List <Supplier>   suppliers        = (List <Supplier>)supplierRepo.FindAll();
            List <Stationery> stationeries     = (List <Stationery>)stationeryRepo.FindAll();
            List <Category>   categories       = (List <Category>)categoryRepo.FindAll();
            List <Department> departments      = (List <Department>)departmentRepo.FindAll();
            ChartFilteringDTO FilteringDetails = new ChartFilteringDTO()
            {
                SupplierForChartList   = suppliers,
                StationeryForChartList = stationeries,
                CategoryForChartList   = categories,
                DepartmentForChartList = departments,
            };

            return(FilteringDetails);
        }