Beispiel #1
0
 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());
     }
 }
Beispiel #2
0
 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());
     }
 }
Beispiel #3
0
 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());
     }
 }
Beispiel #4
0
        public dannie(int id_polz)
        {
            InitializeComponent();

            string prav = SendRequests.get_rules_and_othr(id_polz, 3);

            if (prav[0] != '0')
            {
                read();
            }

            if (prav[1] != '0')
            {
                button1.Enabled = true;
                button2.Enabled = true;
            }
        }
Beispiel #5
0
 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);
     }
 }
Beispiel #6
0
        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);
            }
        }
Beispiel #7
0
        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);
        }
Beispiel #8
0
        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);
        }