Beispiel #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            string ids = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
            int    id  = int.Parse(ids);

            id_doc.Value = id;

            this.Hide();
            NewTable9 NewTable = new NewTable9();

            NewTable.Show();


            //flagTbl = "0";
            //string ids = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
            //int id = int.Parse(ids);

            //DateTime date = DateTime.Now;

            //DB db = new DB();
            //MySqlCommand command = new MySqlCommand("DELETE FROM work_user_doc "  +
            //    " WHERE `doc_id` = @idx", db.getConnection());

            //MySqlCommand command1 = new MySqlCommand("INSERT INTO gotov_doc " +
            //    "SET `Время` = @time," +
            //    " users_id = (SELECT id FROM users WHERE `Логин` = @idu)," +
            //    " doc_id = (SELECT id FROM doc WHERE `id` = @idd)", db.getConnection());

            //command.Parameters.Add("@idx", MySqlDbType.Int32).Value = id;

            //command1.Parameters.Add("@time", MySqlDbType.DateTime).Value = date;
            //command1.Parameters.Add("@idu", MySqlDbType.VarChar).Value = login.Value;
            //command1.Parameters.Add("@idd", MySqlDbType.Int32).Value = id;

            //db.openConnection();

            //if (command.ExecuteNonQuery() == 1 && command1.ExecuteNonQuery() == 1)
            //    MessageBox.Show("Готово");
            //else
            //    MessageBox.Show("Не готово");

            //db.closeConnection();
        }
Beispiel #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (flagTable == 1)
     {
         this.Hide();
         RegisterForm registerForm = new RegisterForm();
         registerForm.Show();
     }
     else
     if (flagTable == 2)
     {
         this.Hide();
         NewTable2 newTable2 = new NewTable2();
         newTable2.Show();
     }
     else
     if (flagTable == 3)
     {
         this.Hide();
         NewTable3 newTable3 = new NewTable3();
         newTable3.Show();
     }
     else
     if (flagTable == 4)
     {
         this.Hide();
         NewTable4 newTable4 = new NewTable4();
         newTable4.Show();
     }
     else
     if (flagTable == 5)
     {
         this.Hide();
         NewTable5 newTable5 = new NewTable5();
         newTable5.Show();
     }
     else
     if (flagTable == 6)
     {
         this.Hide();
         NewTable6 newTable = new NewTable6();
         newTable.Show();
     }
     else
     if (flagTable == 7)
     {
         this.Hide();
         NewTable7 newTable = new NewTable7();
         newTable.Show();
     }
     else
     if (flagTable == 8)
     {
         this.Hide();
         NewTable8 newTable = new NewTable8();
         newTable.Show();
     }
     else
     if (flagTable == 9)
     {
         this.Hide();
         NewTable9 newTable = new NewTable9();
         newTable.Show();
     }
     else
     if (flagTable == 0)
     {
         MessageBox.Show("Выберите таблицу");
     }
 }