} //удаление по столам public void Dish(int a, TextBox textBox) { switch (a) { case 1: ClassOrder s1 = new ClassOrder(); ClassSUM sum1 = new ClassSUM(); s1.Report(a, Convert.ToDouble(textBox.Text)); break; case 2: ClassOrder s2 = new ClassOrder(); ClassSUM sum2 = new ClassSUM(); s2.Report(a, Convert.ToDouble(textBox.Text)); break; case 3: ClassOrder s3 = new ClassOrder(); ClassSUM sum3 = new ClassSUM(); s3.Report(a, Convert.ToDouble(textBox.Text)); break; case 4: ClassOrder s4 = new ClassOrder(); ClassSUM sum4 = new ClassSUM(); s4.Report(a, Convert.ToDouble(textBox.Text)); break; case 5: ClassOrder s5 = new ClassOrder(); ClassSUM sum5 = new ClassSUM(); s5.Report(a, Convert.ToDouble(textBox.Text)); break; case 6: ClassOrder s6 = new ClassOrder(); ClassSUM sum6 = new ClassSUM(); s6.Report(a, Convert.ToDouble(textBox.Text)); break; } } //выгрузка в dishes заказа
} //кнопка оплатить private void button1_Click(object sender, EventArgs e) { int m = comboBox1.SelectedIndex + 1; ClassSUM s2 = new ClassSUM(); textBox2.Text = s2.Itog(m); } //кнопка ok
} //выгрузка в dishes заказа private void button3_Click(object sender, EventArgs e) { try { if (Convert.ToInt32(textBox1.Text) < 100) { ClassSUM s = new ClassSUM(); double a = Convert.ToDouble(textBox2.Text); double b = Convert.ToDouble(textBox3.Text); double c = Convert.ToDouble(textBox1.Text); textBox4.Text = s.SUM(a, b, c).ToString(); } else { MessageBox.Show("Размер скидки не может быть 100%"); } } catch { MessageBox.Show("Заполните поле 'Принято'"); } } //кнопка применить