Ejemplo n.º 1
0
 public ActionResult Create(Customer customer)
 {
     try
     {
     CustomerModel customerModel = new CustomerModel();
     customerModel.create(customer);
     return RedirectToAction("Index");
     }
     catch(Exception e)
     {
         return RedirectToAction("Error", "Home", new { ErrorMessage = e.Message });
     }
     
     
 }
Ejemplo n.º 2
0
 public ActionResult Edit(Customer customer)
 {
     CustomerModel CustomerModel = new CustomerModel();
     CustomerModel.editCustomer(customer);
     return RedirectToAction("Index");
 }
Ejemplo n.º 3
0
 // GET: Customers
 public ActionResult Index()
 {            
     List<Customer> customers = new CustomerModel().getAll();
     ViewBag.customers = customers;
     return View();
 }