Exemple #1
0
        public void DisplayTiming()
        {
            if (comboTables.SelectedIndex != -1)
            {
                comboTimings.SelectedIndex = -1;

                TimingsList timingsLeft = new TimingsList();

                Table table = comboTables.SelectedItem as Table;


                for (int i = 0; i < restaurantTimings.Count; i++)
                {
                    if (!table.Timings.Contains(restaurantTimings.Timings[i]))
                    {
                        timingsLeft.Add(restaurantTimings.Timings[i]);
                    }
                }

                comboTimings.ItemsSource       = timingsLeft.Timings;
                comboTimings.DisplayMemberPath = "Duration";
            }
        }
        public void CheckTimings(object sender, RoutedEventArgs args)
        {
            if (comboTableName.SelectedIndex != -1)
            {
                comboTimings.SelectedIndex = -1;

                TimingsList timingsLeft = new TimingsList();

                Table table = comboTableName.SelectedItem as Table;


                for (int i = 0; i < restaurantTimings.Count; i++)
                {
                    if (!table.Timings.Contains(restaurantTimings.Timings[i]))
                    {
                        timingsLeft.Add(restaurantTimings.Timings[i]);
                    }
                }

                comboTimings.ItemsSource       = timingsLeft.Timings;
                comboTimings.DisplayMemberPath = "Duration";
            }
        }