private void btn_firms_in_country_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Страна", "Введите маску страны"); if (dialog.ShowDialog() == true) { string sql = $"SELECT * FROM firms_country_like('{dialog.ResponseText}')"; FillGridFromDataSet(FillDataSetFromDB(sql)); } }
private void btn_orders_V_fuels_like_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Топливо", "Введите название топлива"); if (dialog.ShowDialog() == true) { string sql = $"SELECT * FROM \"orders_sum_where_V_fuel_like\"('{dialog.ResponseText}')"; FillGridFromDataSet(FillDataSetFromDB(sql)); } }
private void btn_orders_by_firm_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Фирма", "Введите фирму"); if (dialog.ShowDialog() == true) { string sql = $"SELECT * FROM zakazi_by_firm('{dialog.ResponseText}')"; FillGridFromDataSet(FillDataSetFromDB(sql)); } }
private void btn_not_in_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Месяцы", "Введите за сколько последних месяцев"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM \"no_buyers_last_months\"({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void btn_avg_orders_bigger_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Объём", "Введите N"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM \"avg_orders_bigger\"({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void btn_not_in_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Месяцы", "Введите интервал в месяцах"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM no_hospitals_by_last_months({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void btn_sum_zakazi_by_firm_where_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("количество", "Введите количество товаров для данных"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM sum_zakazi_by_firm_where({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void btn_orders_by_last_years_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Месяцы", "Введите за сколько последних лет вернуть заказы"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM zakazi_by_last_years({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private void btn_orders_by_hospital_Click(object sender, RoutedEventArgs e) { var dialog = new MyDialog("Больница", "Введите Номер больницы"); if (dialog.ShowDialog() == true) { try { string sql = $"SELECT * FROM zakazi_by_hospital({dialog.ResponseText})"; FillGridFromDataSet(FillDataSetFromDB(sql)); } catch (Exception ee) { MessageBox.Show("Вы ввели не число", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }