コード例 #1
0
        public ActionResult listSuppelier()
        {
            var Suppelier    = suppelierService.FindAll();
            var SuppelierDTO = AutoMapper.Mapper.Map <ICollection <SuppelierDTO> >(Suppelier);

            return(PartialView(SuppelierDTO));
        }
コード例 #2
0
        public PartialViewResult FromCreateUpdate(int id)
        {
            var product    = productService.FindById(id);
            var ProductDTO = AutoMapper.Mapper.Map <ProductDTO>(product);

            ViewBag.Data = ProductDTO;
            var discount = discountCodeService.FindAll();

            ViewBag.discount = AutoMapper.Mapper.Map <IEnumerable <DiscountCodeDTO> >(discount);
            var category = categoryService.FindAll();

            ViewBag.Category = AutoMapper.Mapper.Map <IEnumerable <CategoryDTO> >(category);
            var supplier = suppelierService.FindAll();

            ViewBag.Supplier = AutoMapper.Mapper.Map <IEnumerable <SuppelierDTO> >(supplier);
            return(PartialView());
        }