Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Exists_InstrIssl, null, textBox1.Text) != "1")
     {
         if (textBox1.Text != "")
         {
             MySqlOperations.Insert_Update_Delete(MySqlOperations.MySqlQueries.Insert_InstrIssl, null, textBox1.Text);
             ID = MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_Last_ID);
             groupBox1.Visible = true;
             groupBox2.Visible = true;
             MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Pokazat_InstrIssl, dataGridView1, ID);
             dataGridView1.Columns[0].Visible = false;
             MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Otdeleniya_InstrIssl, dataGridView2, ID);
             dataGridView2.Columns[0].Visible = false;
             button1.Enabled = false;
             button2.Text    = "Закрыть";
         }
         else
         {
             MessageBox.Show("Поля не заполнены.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("Исследование с введенным вами наименованием уже существует.", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 2
0
 private void Load_Tabs()
 {
     MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Dianozy_Pacienta, dataGridView1, ID);
     dataGridView1.Columns[0].Visible = false;
     MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Perenesennye_Operacii, dataGridView2, ID);
     dataGridView2.Columns[0].Visible = false;
     MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Proved_LabIssl, dataGridView3, ID);
     dataGridView3.Columns[0].Visible = false;
     MySqlOperations.Select_DataGridView(MySqlOperations.MySqlQueries.Select_Proved_InstrIssl, dataGridView6, ID);
     dataGridView6.Columns[0].Visible = false;
 }