решение проблемы + удаление ненужного

This commit is contained in:
parent 545bef5da7
commit 90853a78c7
5 changed files with 4 additions and 9 deletions

View File

@ -127,7 +127,4 @@ public partial class FormDoctors : Form
}
}
}

View File

@ -61,8 +61,4 @@ public class ChartReport
return result;
}
}

View File

@ -95,6 +95,8 @@ public class WordBuilder
return this;
}
public void Build()
{
using var wordDocument = WordprocessingDocument.Create(_filePath,

View File

@ -53,7 +53,8 @@ public class DoctorRepository : IDoctorRepository
try
{
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
// Проверяем, существует ли запись
var existingDoctor = connection.QueryFirstOrDefault<Doctor>("SELECT * FROM Doctors WHERE id = @Id", new { doctor.Id });
if (existingDoctor == null)
{

View File

@ -119,7 +119,6 @@ public class PatientRepository : IPatientRepository
{
using var connection = new NpgsqlConnection(_connectionString.ConnectionString);
// Проверяем, существует ли запись
var existingDoctor = connection.QueryFirstOrDefault<Patient>("SELECT * FROM Patients WHERE id = @Id", new { patient.Id });
if (existingDoctor == null)
{