public ViewResult AddCustomer(Customer customer)
        {
            if (ModelState.IsValid)
            {
                CustomerTbl newCustomer = new CustomerTbl();

                newCustomer.firstName = customer.firstName;
                newCustomer.lastName = customer.lastName;

                customerMgr.Insert(newCustomer);
                return View("PostedCustomer",newCustomer);
            }
            else
            {
                return View();
            }
        }
Beispiel #2
0
        public void Update(CustomerTbl customer)
        {
            var customerRepo = RepositoryFactory.Create("Customer");

            customerRepo.Update(customer);
        }
Beispiel #3
0
        public void Insert(CustomerTbl customer)
        {
            var customerRepo = RepositoryFactory.Create("Customer");

            customerRepo.Insert(customer);
        }