From 17d3ba1026cff5ac0f2b8dd5c383749dc7878792 Mon Sep 17 00:00:00 2001 From: Bulat Date: Thu, 21 Nov 2024 18:48:48 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forms/FormDrug.Designer.cs | 2 +- .../Forms/FormMedicalHistory.Designer.cs | 44 +++++-------------- .../Forms/FormMedicalHistory.cs | 6 --- .../Forms/FormMedicalHistory.resx | 6 --- 4 files changed, 13 insertions(+), 45 deletions(-) diff --git a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormDrug.Designer.cs b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormDrug.Designer.cs index 7c6a744..b1b4c76 100644 --- a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormDrug.Designer.cs +++ b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormDrug.Designer.cs @@ -112,7 +112,7 @@ // AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(354, 450); + ClientSize = new Size(375, 450); Controls.Add(checkedListBoxName); Controls.Add(textBoxDescription); Controls.Add(buttonCancel); diff --git a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.Designer.cs b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.Designer.cs index 3bda3cf..13238ca 100644 --- a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.Designer.cs +++ b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.Designer.cs @@ -34,11 +34,9 @@ labelPacient = new Label(); groupBox1 = new GroupBox(); dataGridView = new DataGridView(); - ColumnDiagnosis = new DataGridViewComboBoxColumn(); - ColumnStatus = new DataGridViewComboBoxColumn(); - ColumnDrug = new DataGridViewComboBoxColumn(); labelDoctor = new Label(); comboBoxDoctor = new ComboBox(); + ColumnDrug = new DataGridViewComboBoxColumn(); groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); SuspendLayout(); @@ -100,7 +98,7 @@ dataGridView.AllowUserToResizeRows = false; dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnDiagnosis, ColumnStatus, ColumnDrug }); + dataGridView.Columns.AddRange(new DataGridViewColumn[] { ColumnDrug }); dataGridView.Location = new Point(9, 26); dataGridView.MultiSelect = false; dataGridView.Name = "dataGridView"; @@ -110,31 +108,6 @@ dataGridView.Size = new Size(510, 188); dataGridView.TabIndex = 0; // - // ColumnDiagnosis - // - ColumnDiagnosis.HeaderText = "Диагноз"; - ColumnDiagnosis.MinimumWidth = 6; - ColumnDiagnosis.Name = "ColumnDiagnosis"; - ColumnDiagnosis.Resizable = DataGridViewTriState.True; - ColumnDiagnosis.SortMode = DataGridViewColumnSortMode.Automatic; - ColumnDiagnosis.Width = 125; - // - // ColumnStatus - // - ColumnStatus.HeaderText = "Статус"; - ColumnStatus.MinimumWidth = 6; - ColumnStatus.Name = "ColumnStatus"; - ColumnStatus.Width = 125; - // - // ColumnDrug - // - ColumnDrug.HeaderText = "Лекарство"; - ColumnDrug.MinimumWidth = 6; - ColumnDrug.Name = "ColumnDrug"; - ColumnDrug.Resizable = DataGridViewTriState.True; - ColumnDrug.SortMode = DataGridViewColumnSortMode.Automatic; - ColumnDrug.Width = 125; - // // labelDoctor // labelDoctor.AutoSize = true; @@ -153,6 +126,15 @@ comboBoxDoctor.Size = new Size(151, 28); comboBoxDoctor.TabIndex = 16; // + // ColumnDrug + // + ColumnDrug.HeaderText = "Лекарство"; + ColumnDrug.MinimumWidth = 6; + ColumnDrug.Name = "ColumnDrug"; + ColumnDrug.Resizable = DataGridViewTriState.True; + ColumnDrug.SortMode = DataGridViewColumnSortMode.Automatic; + ColumnDrug.Width = 125; + // // FormMedicalHistory // AutoScaleDimensions = new SizeF(8F, 20F); @@ -180,10 +162,8 @@ private Label labelPacient; private GroupBox groupBox1; private DataGridView dataGridView; - private DataGridViewComboBoxColumn ColumnDiagnosis; - private DataGridViewComboBoxColumn ColumnStatus; - private DataGridViewComboBoxColumn ColumnDrug; private Label labelDoctor; private ComboBox comboBoxDoctor; + private DataGridViewComboBoxColumn ColumnDrug; } } \ No newline at end of file diff --git a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.cs b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.cs index 90cdd3e..6cc45f2 100644 --- a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.cs +++ b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.cs @@ -57,12 +57,6 @@ namespace RegistrationPatientsPolyclinic.Forms throw new Exception("Имеются незаполненные поля"); } - /* - CreateEntity(0, - Convert.ToInt32(comboBoxPacient.Text), - Convert.ToInt32(row.Cells["ColumnDoctor"].Value), (Diagnosis)row.Cells["ColumnDiagnosis"].Value, - (Status)row.Cells["ColumnStatus"].Value, ColumnDrug); - */ _medicalHistoryRepository.CreateMedicalHistory(MedicalHistory.CreateEntity(0, (int)comboBoxPacient.SelectedValue!, (int)comboBoxDoctor.SelectedValue!, CreateListMedicalHistoryFromDataGrid())); diff --git a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.resx b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.resx index f8b0fa0..cf50a0f 100644 --- a/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.resx +++ b/RegistrationPatientsPolyclinic/RegistrationPatientsPolyclinic/Forms/FormMedicalHistory.resx @@ -117,12 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - True - True