Esempio n. 1
0
        public ActionResult Index()
        {
            var supplierGroups = supplierGroupBll.GetAllSupplierGroups();
            var viewModel      = supplierGroups.Select(g => SupplierGroupViewModel.FromSupplierGroup(g));

            return(View(viewModel));
        }
Esempio n. 2
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var supplierGroup = supplierGroupBll.GetSupplierGroup(id.Value);

            if (supplierGroup == null)
            {
                return(HttpNotFound());
            }
            var viewModel = SupplierGroupViewModel.FromSupplierGroup(supplierGroup);

            return(View(viewModel));
        }