private void изменитьToolStripMenuItem_Click(object sender, EventArgs e) { if (label1.Text == "Выданные кредиты") { MessageBox.Show("Запрещено!"); } else if (label1.Text == "Доступные кредитные программы") { GetData(dataGridView1); EditCredits editCredits = new EditCredits(); editCredits.ShowDialog(); BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "SELECT * FROM CreditTypes;"); } }
private void добавитьToolStripMenuItem_Click(object sender, EventArgs e) { if (label1.Text == "Выданные кредиты") { GetCredit getForm = new GetCredit(); getForm.ShowDialog(); BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "SELECT * FROM BankCredits;"); } else if (label1.Text == "Доступные кредитные программы") { CreditId = dataGridView1.Rows.Count; EditCredits editCredits = new EditCredits(); editCredits.ShowDialog(); BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "SELECT * FROM CreditTypes;"); } }