EventArgs e)
{
// Виконуємо п'ятий запит: З таблиці Угода вивести Суму всіх угод
connect. Open (); adapter5 = new SqlDataAdapter (В«SELECT SUM (SummaSdelki) FROM SdelkaВ», connect); ds5 = new DataSet (); comm5 = new SqlCommand (В«SELECT SUM (SummaSdelki) FROM SdelkaВ», connect);. SelectCommand = comm5; table5 = new DataTable ();. Locale = System. Globalization. CultureInfo. InvariantCulture;. Fill (table5); bs5 = new BindingSource ();. DataSource = table5;. DataSource = bs5;. Columns [0]. HeaderCell. Value = В«СумаВ»;. Close ();
} void button10_Click (object sender, EventArgs e)
{ns = «»; n; = Convert. ToString (textBox19. Text);. Open ();
{= Convert. ToInt32 (ns);
// Видаляємо з таблиці Кліентadapter5 = new SqlDataAdapter (В«DELETE FROM Klient WHERE [N klienta] = 'В» + n + В«'В», connect); ds5 = new DataSet (); comm5 = new SqlCommand (В«DELETE FROM Klient WHERE [N klienta] = 'В» + n + В«'В», connect);. SelectCommand = comm5; table5 = new DataTable ();. Locale = System. Globalization. CultureInfo. InvariantCulture;. Fill (table5); bs5 = new BindingSource ();. DataSource = table5;. DataSource = bs5;
// Виводимо змінену табліцуadapter6 = new SqlDataAdapter (В«SELECT * FROM KlientВ», connect); ds6 = new DataSet (); comm6 = new SqlCommand (В«SELECT * FROM KlientВ», connect);. SelectCommand = comm6; table6 = new DataTable ();. Locale = System. Globalization. CultureInfo. InvariantCulture;. Fill (table6); bs6 = new BindingSource ();. DataSource = table6;
// dataGridView5. DataSource = bs6;. DataSource = bs6;
}
{. Show (В«Ви ввели неправильні значення!В», В«Помилка введенняВ»);
}. Close ();
} void button11_Click (object sender, EventArgs e)
{ns = «»; n; = Convert. ToString (textBox20. Text);. Open ();
{= Convert. ToInt32 (ns);
// Видаляємо з таблиці Скідкаadapter5 = new SqlDataAdapter (В«DELETE FROM Skidka WHERE [N skidki] = 'В» + n + В«'В», connect); ds5 = new DataSet (); comm5 = new SqlCommand (В«DELETE FROM Skidka WHERE [N skidki] = 'В» + n + В«'В», connect);. SelectCommand = comm5; table5 = new DataTable ();. Locale = System. Globalization. CultureInfo. InvariantCulture;. Fill (table5); bs5 = new BindingSource ();. DataSource = table5;. DataSource = bs5;
// Виводимо змінену табліцуadapter6 = new SqlDataAdapter (В«SELECT * FROM SkidkaВ», connect); ds6 = new DataSet (); comm6 = new SqlCommand (В«SELECT * FROM SkidkaВ», connect);. SelectCommand = comm6; table6 = new DataTable ();. Locale = System. Globalization. CultureInfo. InvariantCulture;....