コード例 #1
0
 private void RefreshComboBoxes(object sender, EventArgs e)
 {
     // Load function list data and assign to combobox
     if (TypeComboBox.Text == "Milling")
     {
         List <string> functionData = SqliteDataAcces.SearchDataByNumeric("Function", "ToolFunctions_milling", "ToolTypeID", "1");
         functionData = functionData.OrderBy(q => q).Distinct().ToList();
         FunctionComboBox.ItemsSource = functionData;
     }
     else if (TypeComboBox.Text == "Turning")
     {
         List <string> functionData = SqliteDataAcces.SearchDataByNumeric("Function", "ToolFunctions_turning", "ToolTypeID", "2");
         functionData = functionData.OrderBy(q => q).Distinct().ToList();
         FunctionComboBox.ItemsSource = functionData;
     }
 }