示例#1
0
        public ActionResult Edit(int id)
        {
            CustomerManager customerMgr = new CustomerManager();
            CustomerModel customerModel = customerMgr.GetCustomerById(id);

            return View(customerModel);
        }
示例#2
0
        public ActionResult Edit(CustomerModel customerModel)
        {
            CustomerManager customerMgr = new CustomerManager();
            customerMgr.SaveCustomerDetails(customerModel);

            return RedirectToAction("Index");
        }
示例#3
0
        public ActionResult Delete(int id)
        {
            CustomerManager customerMgr = new CustomerManager();
            customerMgr.DeleteCustomer(id);

            return RedirectToAction("Index");
        }
示例#4
0
 private IList<CustomerModel> GetAllCustomers()
 {
     CustomerManager customerMgr = new CustomerManager();
     return customerMgr.GetCustomerDetails();
 }