ss
This commit is contained in:
parent
58680c1f80
commit
2e8b98b5a8
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user