if имя_comboBox2 SelectedIndex -1 Фамилия_comboBox1 SelectedIndex -1 d

1
2
3
4
5
6
7
8
9
if(имя_comboBox2.SelectedIndex != -1 && Фамилия_comboBox1.SelectedIndex != -1)
{
dataGridView1.DataSource = mysql.get_Table("select employess.N as 'Имя', employess.O as 'Отчество',tables.description as 'Столик',data as 'Дата заказа', time as 'Время заказа', made as 'Выполнен (YES) / Не выполнен (NO)',order_amount as 'Сумма заказа'from orders, `tables`,employess where orders.`table` = tables.code_table and employess.id_employess = orders.the_waiter and employess.N = '" + имя_comboBox2.Text + "'and employess.O = '" +Фамилия_comboBox1.Text + "';");
}
else
{
dataGridView1.DataSource = mysql.get_Table("select employess.N as 'Имя', employess.O as 'Отчество',tables.description as 'Столик',data as 'Дата заказа', time as 'Время заказа', made as 'Выполнен (YES) / Не выполнен (NO)',order_amount as 'Сумма заказа'from orders, `tables`,employess where orders.`table` = tables.code_table and employess.id_employess = orders.the_waiter and employess.N = '" + имя_comboBox2.Text + "';");
}