Пример #1
0
 private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     edit = false;
     if (label1.Text == "Доступные виды вкладов")
     {
         IdOfDeposit = dataGridView1.Rows.Count;
         EditDeposits editDeposits = new EditDeposits();
         editDeposits.ShowDialog();
         BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "Select * From DepositTypes;");
     }
     else if (label1.Text == "Вклады клиентов банка")
     {
         GetDeposit getDeposit = new GetDeposit();
         getDeposit.ShowDialog();
         BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "Select * From BankDeposits;");
     }
 }
Пример #2
0
 private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     edit = true;
     if (label1.Text == "Доступные виды вкладов")
     {
         DepositId      = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
         DepositName    = dataGridView1[1, dataGridView1.CurrentRow.Index].Value.ToString();
         DepositPercent = dataGridView1[2, dataGridView1.CurrentRow.Index].Value.ToString();
         EditDeposits editDeposits = new EditDeposits();
         editDeposits.ShowDialog();
         BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "Select * From DepositTypes;");
     }
     else if (label1.Text == "Вклады клиентов банка")
     {
         AccountNumber  = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
         AccountAmount  = Convert.ToDouble(dataGridView1[3, dataGridView1.CurrentRow.Index].Value).ToString();
         PassportNumber = dataGridView1[4, dataGridView1.CurrentRow.Index].Value.ToString();
         AccountType    = dataGridView1[5, dataGridView1.CurrentRow.Index].Value.ToString();
         GetDeposit getDeposit = new GetDeposit();
         getDeposit.ShowDialog();
         BuildInQueries.SQLQuery(bindingNavigator1, dataGridView1, "Select * From BankDeposits;");
     }
 }