Exemplo n.º 1
0
 // 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;
 }
Exemplo n.º 3
0
        // Create 
        public static Customer Create()
        {
            Customer customer = new Customer();

            customers.Add(customer);

            return customer;
        }
Exemplo n.º 4
0
 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);

        }
Exemplo n.º 6
0
        //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;

        }
Exemplo n.º 7
0
 public static void Delete(Customer customer)
 {
     customers.Remove(customer);
 }
Exemplo n.º 8
0
 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;
 }