Ejemplo n.º 1
0
        public ActionResult GetCustomerProfile(ShowCustomerViewModel model)
        {
            var customer = customerRepository.Find(model.Customer.Id);

            model.Customer = customer;
            return(View(model));
        }
        // GET: Admin/CustomerManagement
        public ActionResult Index()
        {
            ShowCustomerViewModel model = new ShowCustomerViewModel()
            {
                CustomerList = _customersManagement.GetAll().OrderBy(d => d.Name).ToList()
            };

            return(View(model));
        }
Ejemplo n.º 3
0
        public IActionResult CustomerList()
        {
            ShowCustomerViewModel InfoCustomers = new ShowCustomerViewModel
            {
                Customers = customerRepository.All()
            };

            return(View(InfoCustomers));
        }
Ejemplo n.º 4
0
        public ActionResult Detail(string alias, int id)
        {
            using (CMSEntities db = new CMSEntities())
            {
                ShowCustomerViewModel model = new ShowCustomerViewModel();
                model.Customer         = db.Posts.Find(id);
                model.CategoryCustomer = db.CategoryPosts.Find(model.Customer.idCategory);
                model.RelateCustomers  = db.Posts.Where(p => p.idCategory == model.Customer.idCategory && p.id != model.Customer.id).ToList();

                return(View(model));
            }
        }