예제 #1
0
        public async Task <IActionResult> Add()
        {
            var AP = new AddProductViewModel();

            AP.categories = await cateRepo.GetAllCategory();

            AP.vendors = await venRepo.GetAllVendors();

            return(View(AP));
        }
예제 #2
0
        public async Task <JsonResult> getvondrer()
        {
            IEnumerable <Vendor> vendor = await venRepo.GetAllVendors();

            //List<Vendor> vendors = new List<Vendor>
            //{
            //    new Vendor
            //    {
            //        categories=await cateRepo.GetAllCategory()
            //    }
            //};
            return(Json(vendor));
        }
예제 #3
0
        public IActionResult Index()
        {
            var items   = _itemRepository.GetAllItems().OrderBy(i => i.UnitPrice);
            var vendors = _vendorReository.GetAllVendors();

            var homeViewModel = new HomeViewModel();

            homeViewModel.ItemsListTitle = "Products List";
            homeViewModel._Items         = items.ToList();

            homeViewModel.VendorsListTitle = "Registered Vendors";
            homeViewModel._Vendors         = vendors.ToList();

            return(View(homeViewModel));
        }
예제 #4
0
 public async Task <IEnumerable <Vendor> > GetAllVendors()
 {
     return(await _vendorRepository.GetAllVendors());
 }
예제 #5
0
        public async Task <IActionResult> Index()
        {
            var vendor = await vendorRepo.GetAllVendors();

            return(View(vendor));
        }
예제 #6
0
        // GET: Vendors


        public IActionResult Index()
        {
            return(View(vendorRepo.GetAllVendors()));
        }
예제 #7
0
 public List <VendorViewModel> GetAllVendors()
 {
     return(_VendorRepository.GetAllVendors());
 }