This commit is contained in:
Pipiaka 2024-12-23 07:29:20 +04:00
parent 58680c1f80
commit 2e8b98b5a8
2 changed files with 4 additions and 4 deletions

View File

@ -9,18 +9,18 @@ public class Vacation
public int EmployeeId { get; private set; }
public int Director { get; private set; }
public int DirectorId { get; private set; }
public DateTime StartDate { get; private set; }
public DateTime EndDate { get; private set; }
public static Vacation CreateOpeartion(int id, int director, int employeeId, DateTime startDate, DateTime endDate)
public static Vacation CreateOpeartion(int id, int directorId, int employeeId, DateTime startDate, DateTime endDate)
{
return new Vacation
{
Id = id,
Director = director,
DirectorId = directorId,
EmployeeId = employeeId,
StartDate = startDate,
EndDate = endDate

View File

@ -29,7 +29,7 @@ public class VacationRepositories : IVacationRepositories
connection.Open();
var queryInsert = @"
INSERT INTO Vacation
VALUES (DEFAULT, @Director, @EmployeeId, @StartDate, @EndDate)";
VALUES (DEFAULT, @DirectorId, @EmployeeId, @StartDate, @EndDate)";
connection.Execute(queryInsert, vacation);
}
catch (Exception ex)