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);
 }