// Update public static void Update(Customer customer, string firstName, string lastName, string telephone, string emailAddress) { customer.FirstName = firstName; customer.LastName = lastName; customer.TelephoneNumber = telephone; customer.EmailAddress = emailAddress; }
public static void Update(Reservation reservation, Customer customer, Room room, DateTime checkInDate, DateTime checkOutDate) { reservation.Customer = customer; reservation.Room = room; reservation.CheckInDate = checkInDate; reservation.CheckOutDate = checkOutDate; }
// Create public static Customer Create() { Customer customer = new Customer(); customers.Add(customer); return customer; }
public CustomerEdit(Customer x) : this() { InitializeComponent(); this.tempCust = x; textBoxFirst.Text = tempCust.firstName; textBoxLast.Text = tempCust.lastName; textBoxEmail.Text = tempCust.email; textBoxTele.Text = tempCust.tele; tempID = tempCust.id; }
private void buttonAddCustomer_Click(object sender, RoutedEventArgs e) { Customer customer = new Customer { FirstName = "John", LastName = "Doe", EmailAddress = "*****@*****.**", TelephoneNumber = "123456789" }; CustomerRepository.Add(customer); }
//Create Method public static Customer Create(int id, string firstName, string lastName, string email, string phoneNumber) { Customer customer = new Customer(); customer.id = id; customer.FirstName= firstName; customer.LastName= lastName; customer.EmailAddress= email; customer.TelephoneNumber = phoneNumber; customers.Add(customer); return customer; }
public static void Delete(Customer customer) { customers.Remove(customer); }
public static void Add(Customer customer) { customers.Add(customer); }
private void dataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { currentlySelectedCustomer = (Customer)dataGrid.SelectedItem; }
private void comboBoxCustomer_SelectionChanged(object sender, SelectionChangedEventArgs e) { selectedCustomer = (Customer)comboBoxCustomer.SelectedItem; }