private void Button_Click(object sender, RoutedEventArgs e)
        {
            lastTable = Holiday_Database_Connector.GetTable().AsDataView();
            holiday_table.ItemsSource = lastTable;

            foreach (DataGridColumn column in holiday_table.Columns)
            {
                column.Width = new DataGridLength(1.0, DataGridLengthUnitType.Star);
            }
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            StringBuilder command = new StringBuilder();

            for (int i = 0; i < holiday_table.SelectedItems.Count; i++)
            {
                if (i > 0)
                {
                    command.Append(" OR ");
                }
                command.Append("(Name = '" + (holiday_table.SelectedItems[i] as DataRowView)[0] + "')");
            }
            Holiday_Database_Connector.DeleteTable(command.ToString());

            lastTable = Holiday_Database_Connector.GetTable().AsDataView();
            holiday_table.ItemsSource = lastTable;

            foreach (DataGridColumn column in holiday_table.Columns)
            {
                column.Width = new DataGridLength(1.0, DataGridLengthUnitType.Star);
            }
        }
Example #3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     holiday_table.ItemsSource = Holiday_Database_Connector.GetTable();
 }
Example #4
0
 public Holidays()
 {
     InitializeComponent();
     holiday_table.ItemsSource = Holiday_Database_Connector.GetTable();
 }