예제 #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;
 }
예제 #3
0
        // Create 
        public static Customer Create()
        {
            Customer customer = new Customer();

            customers.Add(customer);

            return customer;
        }
예제 #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);

        }
예제 #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;

        }
예제 #7
0
 public static void Delete(Customer customer)
 {
     customers.Remove(customer);
 }
예제 #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;
 }