コード例 #1
0
        public void LoadListCustomerTypeFromDB()
        {
            List <CustomerType> customerType = new List <CustomerType>();

            customerType.Clear();
            customerType.AddRange(CustomerType.GetCustomerType());

            ListCustomerType.Clear();
            foreach (var item in customerType)
            {
                ListCustomerType.Add(item);
            }
        }
コード例 #2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            HotelManager.gui.RegulationUC.ListCustomerType.Clear();

            List <CustomerType> customerTypes = new List <CustomerType>();

            customerTypes.Clear();
            customerTypes.AddRange(CustomerType.GetCustomerType());
            foreach (var item in customerTypes)
            {
                HotelManager.gui.RegulationUC.ListCustomerType.Add(item);
            }

            CollectionViewSource.GetDefaultView(HotelManager.gui.RegulationUC.ListCustomerType).Refresh();
        }
コード例 #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     cbColumnCustomerType.ItemsSource       = CustomerType.GetCustomerType();
     cbColumnCustomerType.DisplayMemberPath = "Type";
     cbColumnCustomerType.SelectedValuePath = "Type";
 }