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)); }
public IActionResult CustomerList() { ShowCustomerViewModel InfoCustomers = new ShowCustomerViewModel { Customers = customerRepository.All() }; return(View(InfoCustomers)); }
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)); } }