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); } }
private void button1_Click(object sender, EventArgs e) { if (MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Exists_Preparaty, null, textBox1.Text, textBox2.Text) != "1") { if (textBox1.Text != "" && textBox2.Text != "") { MySqlOperations.Insert_Update_Delete(MySqlOperations.MySqlQueries.Insert_Preparaty, null, textBox1.Text, textBox2.Text); this.Close(); } else { MessageBox.Show("Поля не заполнены.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("Препарат с введенными вами наименованием и свойствами уже существует.", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void button1_Click(object sender, EventArgs e) { if (MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Exists_Gcgp, null, maskedTextBox1.Text, textBox1.Text) != "1") { if (maskedTextBox1.Text.Length > 9 && textBox1.Text != "") { MySqlOperations.Insert_Update_Delete(MySqlOperations.MySqlQueries.Insert_Gcgp, null, maskedTextBox1.Text, textBox1.Text); this.Close(); } else { MessageBox.Show("Поля не заполнены.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("Филиал ГЦГП с введенным вами номером и (или) адресом уже существует.", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Load_ComboBoxes(object sender, EventArgs e) { MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Pacienty_ComboBox, comboBox1); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Otdeleniya_ComboBox, comboBox2); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Lech_Vrach_ComboBox, comboBox3, MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Otdeleniya_ComboBox, null, comboBox2.Text)); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Diagnozy_ComboBox, comboBox4); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_LabIssl_ComboBox, comboBox5, null, ID_Otdeleniya); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_InstrIssl_ComboBox, comboBox6, null, ID_Otdeleniya); }
public Epikrizy(MySqlOperations mySqlOperations, string iD = null) { InitializeComponent(); MySqlOperations = mySqlOperations; ID = iD; dateTimePicker1.MaxDate = DateTime.Now; dateTimePicker1.Value = dateTimePicker1.MaxDate; MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Pacienty_ComboBox, comboBox1); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Otdeleniya_ComboBox, comboBox2); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Lech_Vrach_ComboBox, comboBox3, MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Otdeleniya_ComboBox, null, comboBox2.Text)); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_Diagnozy_ComboBox, comboBox4); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_LabIssl_ComboBox, comboBox5, null, ID_Otdeleniya); MySqlOperations.Select_ComboBox(MySqlOperations.MySqlQueries.Select_InstrIssl_ComboBox, comboBox6, null, ID_Otdeleniya); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "") { string date = dateTimePicker1.Value.Year.ToString() + '-' + dateTimePicker1.Value.Month.ToString() + '-' + dateTimePicker1.Value.Day.ToString(); MySqlOperations.Insert_Update_Delete(MySqlOperations.MySqlQueries.Insert_Pacienty, null, textBox1.Text, textBox2.Text, textBox3.Text, date, comboBox2.Text, textBox4.Text, MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Gcgp_ComboBox, null, comboBox1.Text)); this.Close(); } else { MessageBox.Show("Поля не заполнены.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void button1_Click(object sender, EventArgs e) { Chart chart = new Chart(); DataTable dataTable = MySqlOperations.Select_DataTable(MySqlOperations.MySqlQueries.Select_Dinamic, MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Diagnozy_ComboBox, null, comboBox1.Text)); chart.Text = "Динамика заболеваемости по " + '"' + comboBox1.Text + '"'; chart.chart1.Series[0].Name = "Количество заболевших"; chart.chart1.Series[0].Points.Clear(); chart.chart1.Series[0].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; for (int i = 0; i < dataTable.Rows.Count; i++) { chart.chart1.Series[0].Points.AddXY(dataTable.Rows[i][1].ToString(), int.Parse(dataTable.Rows[i][0].ToString())); } chart.Show(); this.Close(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "") { MySqlOperations.Insert_Update_Delete(MySqlOperations.MySqlQueries.Insert_Personal, null, textBox1.Text, textBox2.Text, textBox3.Text, MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Otdeleniya_ComboBox, null, comboBox1.Text), MySqlOperations.Select_Text(MySqlOperations.MySqlQueries.Select_ID_Doljnosti_ComboBox, null, comboBox2.Text)); this.Close(); } else { MessageBox.Show("Поля не заполнены.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }