Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        public void Update(CustomerTbl customer)
        {
            var customerRepo = RepositoryFactory.Create("Customer");

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

            customerRepo.Insert(customer);
        }