예제 #1
0
        public ListWarehouseForListVm GetAllWarehouseForList(string userId)
        {
            var warehouses = _warehouseRepository.GetAllWarehouses(userId)
                             .ProjectTo <WarehouseForListVm>(_mapper.ConfigurationProvider).ToList();
            var warehouseList = new ListWarehouseForListVm()
            {
                Count      = warehouses.Count,
                Warehouses = warehouses,
            };

            return(warehouseList);
        }
예제 #2
0
        public ActionResult Warehouses()
        {
            var model = new IndexPageViewModel()
            {
                Ware = ware.GetAllWarehouses().ToDictionary(x => x.Id)
            };

            return(View(model));
        }
        public JsonResult GetAllWarehouses()
        {
            var result = warehouseRepository.GetAllWarehouses().Select(s => new { s.WarehouseID, s.Name });

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
 public List <Warehouse> GetAllWarehouses()
 {
     return(repository.GetAllWarehouses());
 }