protected void cmdAddCustomer_Click(object sender, EventArgs e)
        {
            ICustomerService customerService = new CustomerServiceInMemory();

            CustomerEntity newCustomer = new CustomerEntity {
                FirstName = txtFirstName.Text,
                LastName = txtLastName.Text,
                Company = txtCompany.Text,
                Email = txtEMailAddress.Text,
                WorkPhone = txtWorkPhone.Text,
                HomePhone = txtHomePhone.Text
            };

            customerService.Create(newCustomer);

            Response.Redirect("Customers");
        }
예제 #2
0
 public void Update(CustomerEntity Customer)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void Create(CustomerEntity Customer)
 {
     CustomerList.Add(Customer);
 }