private void button3_Click(object sender, EventArgs e) { for (int i = 0; i < edl.Count; i++) { OracleDataReader d = SendRequests.send("UPDATE strana SET strana = '" + dataGridView1[1, Convert.ToInt32(edl[i])].Value.ToString() + "' WHERE id_strani = " + dataGridView1[0, Convert.ToInt32(edl[i])].Value.ToString()); } }
private void button3_Click(object sender, EventArgs e) { for (int i = 0; i < edl.Count; i++) { OracleDataReader d = SendRequests.send("UPDATE data_lists SET name = '" + dataGridView1[1, Convert.ToInt32(edl[i])].Value.ToString() + "', uroven_kritichnosi = '" + dataGridView1[2, Convert.ToInt32(edl[i])].Value.ToString() + "' WHERE id_table = " + dataGridView1[0, Convert.ToInt32(edl[i])].Value.ToString()); } }
private void button3_Click(object sender, EventArgs e) { for (int i = 0; i < edl.Count; i++) { OracleDataReader d = SendRequests.send("UPDATE rezhisser SET fio = '" + dataGridView1[1, Convert.ToInt32(edl[i])].Value.ToString() + "', god_rozhdenia = '" + dataGridView1[2, Convert.ToInt32(edl[i])].Value.ToString() + "' WHERE id_rezh = " + dataGridView1[0, Convert.ToInt32(edl[i])].Value.ToString()); } }
private void button2_Click(object sender, EventArgs e) { try { OracleDataReader d = SendRequests.send("DELETE FROM strana WHERE id_strani = " + dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString()); dataGridView1.Rows.Remove(dataGridView1.CurrentRow); } catch { MessageBox.Show( "Нельзя удалить запись", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); } }
private void read() { OracleDataReader d = SendRequests.send("SELECT * FROM data_lists"); if (d.HasRows) { while (d.Read()) { dataGridView1.Rows.Add(d.GetInt32(0), d.GetString(1), d.GetInt32(2)); } } else { MessageBox.Show( "Нет данных для вывода на экран", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); } }
private void button1_Click(object sender, EventArgs e) { OracleDataReader d = SendRequests.send("INSERT INTO strana VALUES ( (SELECT nvl(MAX(ID_STRANI) + 1, 1) FROM strana), '" + textBox1.Text + "' )"); dataGridView1.Rows.Add(Convert.ToInt32(dataGridView1[0, dataGridView1.Rows.Count - 1].Value) + 1, textBox1.Text); }
private void button1_Click(object sender, EventArgs e) { OracleDataReader d = SendRequests.send("INSERT INTO role_user VALUES ( (SELECT nvl(MAX(ID_ROLE) + 1, 1) FROM role_user), '" + textBox1.Text + "', " + textBox2.Text + " )"); dataGridView1.Rows.Add(Convert.ToInt32(dataGridView1[0, dataGridView1.Rows.Count - 1].Value) + 1, textBox1.Text, textBox2.Text); }