diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/ClientBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/ClientBusinessLogicContract.cs new file mode 100644 index 0000000..730d604 --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/ClientBusinessLogicContract.cs @@ -0,0 +1,74 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace MagicCarpetBusinessLogic.Implementations; + +internal class ClientBusinessLogicContract(IClientStorageContract clientStorageContract, ILogger logger) : IClientBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly IClientStorageContract _clientStorageContract = clientStorageContract; + + public List GetAllClients() + { + _logger.LogInformation("GetAllClients"); + return _clientStorageContract.GetList() ?? throw new NullListException(); + } + + public ClientDataModel GetClientByData(string data) + { + _logger.LogInformation("Get element by data: {data}", data); + if (data.IsEmpty()) + { + throw new ArgumentNullException(nameof(data)); + } + if (data.IsGuid()) + { + return _clientStorageContract.GetElementById(data) ?? throw new ElementNotFoundException(data); + } + if (Regex.IsMatch(data, @"^((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$")) + { + return _clientStorageContract.GetElementByPhoneNumber(data) ?? throw new ElementNotFoundException(data); + } + return _clientStorageContract.GetElementByFIO(data) ?? throw new ElementNotFoundException(data); + } + + public void InsertClient(ClientDataModel clientDataModel) + { + _logger.LogInformation("New data: {json}", JsonSerializer.Serialize(clientDataModel)); + ArgumentNullException.ThrowIfNull(clientDataModel); + clientDataModel.Validate(); + _clientStorageContract.AddElement(clientDataModel); + } + + public void UpdateClient(ClientDataModel clientDataModel) + { + _logger.LogInformation("Update data: {json}", JsonSerializer.Serialize(clientDataModel)); + ArgumentNullException.ThrowIfNull(clientDataModel); + clientDataModel.Validate(); + _clientStorageContract.UpdElement(clientDataModel); + } + + public void DeleteClient(string id) + { + _logger.LogInformation("Delete by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _clientStorageContract.DelElement(id); + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/EmployeeBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/EmployeeBusinessLogicContract.cs new file mode 100644 index 0000000..8fe812f --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/EmployeeBusinessLogicContract.cs @@ -0,0 +1,108 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace MagicCarpetBusinessLogic.Implementations; + +internal class EmployeeBusinessLogicContract(IEmployeeStorageContract employeeStorageContract, ILogger logger) : IEmployeeBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly IEmployeeStorageContract _employeeStorageContract = employeeStorageContract; + + public List GetAllEmployees(bool onlyActive = true) + { + _logger.LogInformation("GetAllEmployees params: {onlyActive}", onlyActive); + return _employeeStorageContract.GetList(onlyActive) ?? throw new NullListException(); + } + + public List GetAllEmployeesByPost(string postId, bool onlyActive = true) + { + _logger.LogInformation("GetAllEmployees params: {postId}, {onlyActive},", postId, onlyActive); + if (postId.IsEmpty()) + { + throw new ArgumentNullException(nameof(postId)); + } + if (!postId.IsGuid()) + { + throw new ValidationException("The value in the field postId is not a unique identifier."); + } + return _employeeStorageContract.GetList(onlyActive, postId) ?? throw new NullListException(); + } + + public List GetAllEmployeesByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + _logger.LogInformation("GetAllEmployees params: {onlyActive}, {fromDate}, {toDate}", onlyActive, fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + return _employeeStorageContract.GetList(onlyActive, fromBirthDate: fromDate, toBirthDate: toDate) ?? throw new NullListException(); + } + + public List GetAllEmployeesByEmploymentDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + _logger.LogInformation("GetAllEmployees params: {onlyActive}, {fromDate}, {toDate}", onlyActive, fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + return _employeeStorageContract.GetList(onlyActive, fromEmploymentDate: fromDate, toEmploymentDate: toDate) ?? throw new NullListException(); + } + + public EmployeeDataModel GetEmployeeByData(string data) + { + _logger.LogInformation("Get element by data: {data}", data); + if (data.IsEmpty()) + { + throw new ArgumentNullException(nameof(data)); + } + if (data.IsGuid()) + { + return _employeeStorageContract.GetElementById(data) ?? throw new ElementNotFoundException(data); + } + if (Regex.IsMatch(data, @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$")) + { + return _employeeStorageContract.GetElementByEmail(data) ?? throw new ElementNotFoundException(data); + } + return _employeeStorageContract.GetElementByFIO(data) ?? throw new ElementNotFoundException(data); + } + + public void InsertEmployee(EmployeeDataModel employeeDataModel) + { + _logger.LogInformation("New data: {json}", JsonSerializer.Serialize(employeeDataModel)); + ArgumentNullException.ThrowIfNull(employeeDataModel); + employeeDataModel.Validate(); + _employeeStorageContract.AddElement(employeeDataModel); + } + + public void UpdateEmployee(EmployeeDataModel employeeDataModel) + { + _logger.LogInformation("Update data: {json}", JsonSerializer.Serialize(employeeDataModel)); + ArgumentNullException.ThrowIfNull(employeeDataModel); + employeeDataModel.Validate(); + _employeeStorageContract.UpdElement(employeeDataModel); + } + + public void DeleteEmployee(string id) + { + _logger.LogInformation("Delete by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _employeeStorageContract.DelElement(id); + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/PostBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/PostBusinessLogicContract.cs new file mode 100644 index 0000000..b682234 --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/PostBusinessLogicContract.cs @@ -0,0 +1,95 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +namespace MagicCarpetBusinessLogic.Implementations; + +internal class PostBusinessLogicContract(IPostStorageContract postStorageContract, ILogger logger) : IPostBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly IPostStorageContract _postStorageContract = postStorageContract; + public List GetAllPosts(bool onlyActive = true) + { + _logger.LogInformation("GetAllPosts params: {onlyActive}", onlyActive); + return _postStorageContract.GetList(onlyActive) ?? throw new NullListException(); + } + + public List GetAllDataOfPost(string postId) + { + _logger.LogInformation("GetAllDataOfPost for {postId}", postId); + if (postId.IsEmpty()) + { + throw new ArgumentNullException(nameof(postId)); + } + if (!postId.IsGuid()) + { + throw new ValidationException("The value in the field postId is not a unique identifier."); + } + return _postStorageContract.GetPostWithHistory(postId) ?? throw new NullListException(); + } + + public PostDataModel GetPostByData(string data) + { + _logger.LogInformation("Get element by data: {data}", data); + if (data.IsEmpty()) + { + throw new ArgumentNullException(nameof(data)); + } + if (data.IsGuid()) + { + return _postStorageContract.GetElementById(data) ?? throw new ElementNotFoundException(data); + } + return _postStorageContract.GetElementByName(data) ?? throw new ElementNotFoundException(data); + } + + public void InsertPost(PostDataModel postDataModel) + { + _logger.LogInformation("New data: {json}", JsonSerializer.Serialize(postDataModel)); + ArgumentNullException.ThrowIfNull(postDataModel); + postDataModel.Validate(); + _postStorageContract.AddElement(postDataModel); + } + + public void UpdatePost(PostDataModel postDataModel) + { + _logger.LogInformation("Update data: {json}", JsonSerializer.Serialize(postDataModel)); + ArgumentNullException.ThrowIfNull(postDataModel); + postDataModel.Validate(); + _postStorageContract.UpdElement(postDataModel); + } + + public void DeletePost(string id) + { + _logger.LogInformation("Delete by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _postStorageContract.DelElement(id); + } + + public void RestorePost(string id) + { + _logger.LogInformation("Restore by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _postStorageContract.ResElement(id); + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SalaryBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SalaryBusinessLogicContract.cs new file mode 100644 index 0000000..237d55c --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SalaryBusinessLogicContract.cs @@ -0,0 +1,66 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MagicCarpetBusinessLogic.Implementations; +internal class SalaryBusinessLogicContract(ISalaryStorageContract salaryStorageContract,ISaleStorageContract saleStorageContract, + IPostStorageContract postStorageContract, IEmployeeStorageContract employeeStorageContract, ILogger logger) : ISalaryBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly ISalaryStorageContract _salaryStorageContract = salaryStorageContract; + private readonly ISaleStorageContract _saleStorageContract = saleStorageContract; + private readonly IPostStorageContract _postStorageContract = postStorageContract; + private readonly IEmployeeStorageContract _employeeStorageContract = employeeStorageContract; + public List GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate) + { + _logger.LogInformation("GetAllSalaries params: {fromDate}, {toDate}", fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + return _salaryStorageContract.GetList(fromDate, toDate) ?? throw new NullListException(); + } + + public List GetAllSalariesByPeriodByEmployee(DateTime fromDate, DateTime toDate, string employeeId) + { + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + if (employeeId.IsEmpty()) + { + throw new ArgumentNullException(nameof(employeeId)); + } + if (!employeeId.IsGuid()) + { + throw new ValidationException("The value in the field employeeId is not a unique identifier."); + } + _logger.LogInformation("GetAllSalaries params: {fromDate}, {toDate}, {employeeId}", fromDate, toDate, employeeId); + return _salaryStorageContract.GetList(fromDate, toDate, employeeId) ?? throw new NullListException(); + } + + public void CalculateSalaryByMounth(DateTime date) + { + _logger.LogInformation("CalculateSalaryByMounth: {date}", date); + var startDate = new DateTime(date.Year, date.Month, 1); + var finishDate = new DateTime(date.Year, date.Month, DateTime.DaysInMonth(date.Year, date.Month)); + var employees = _employeeStorageContract.GetList() ?? throw new NullListException(); + foreach (var employee in employees) + { + var sales = _saleStorageContract.GetList(startDate, finishDate, employeeId: employee.Id)?.Sum(x => x.Sum) ?? + throw new NullListException(); + var post = _postStorageContract.GetElementById(employee.PostId) ?? + throw new NullListException(); + var salary = post.Salary + sales * 0.1; + _logger.LogDebug("The employee {employeeId} was paid a salary of {salary}", employee.Id, salary); + _salaryStorageContract.AddElement(new SalaryDataModel(employee.Id, finishDate, salary)); + } + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SaleBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SaleBusinessLogicContract.cs new file mode 100644 index 0000000..d24dbfe --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/SaleBusinessLogicContract.cs @@ -0,0 +1,119 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace MagicCarpetBusinessLogic.Implementations; + +internal class SaleBusinessLogicContract(ISaleStorageContract saleStorageContract, ILogger logger) : ISaleBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly ISaleStorageContract _saleStorageContract = saleStorageContract; + + public List GetAllSalesByPeriod(DateTime fromDate, DateTime toDate) + { + _logger.LogInformation("GetAllSales params: {fromDate}, {toDate}", fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + return _saleStorageContract.GetList(fromDate, toDate) ?? throw new NullListException(); + } + + public List GetAllSalesByEmployeeByPeriod(string employeeId, DateTime fromDate, DateTime toDate) + { + _logger.LogInformation("GetAllSales params: {employeeId}, {fromDate}, {toDate}", employeeId, fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + if (employeeId.IsEmpty()) + { + throw new ArgumentNullException(nameof(employeeId)); + } + if (!employeeId.IsGuid()) + { + throw new ValidationException("The value in the field employeeId is not a unique identifier."); + } + return _saleStorageContract.GetList(fromDate, toDate, employeeId: employeeId) ?? throw new NullListException(); + } + + public List GetAllSalesByClientByPeriod(string clientId, DateTime fromDate, DateTime toDate) + { + _logger.LogInformation("GetAllSales params: {buyerId}, {fromDate}, {toDate}", clientId, fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + if (clientId.IsEmpty()) + { + throw new ArgumentNullException(nameof(clientId)); + } + if (!clientId.IsGuid()) + { + throw new ValidationException("The value in the field clientId is not a unique identifier."); + } + return _saleStorageContract.GetList(fromDate, toDate, clientId: clientId) ?? throw new NullListException(); + } + + public List GetAllSalesByTourByPeriod(string tourId, DateTime fromDate, DateTime toDate) + { + _logger.LogInformation("GetAllSales params: {tourId}, {fromDate}, {toDate}", tourId, fromDate, toDate); + if (fromDate.IsDateNotOlder(toDate)) + { + throw new IncorrectDatesException(fromDate, toDate); + } + if (tourId.IsEmpty()) + { + throw new ArgumentNullException(nameof(tourId)); + } + if (!tourId.IsGuid()) + { + throw new ValidationException("The value in the field tourId is not a unique identifier."); + } + return _saleStorageContract.GetList(fromDate, toDate, tourId: tourId) ?? throw new NullListException(); + } + + public SaleDataModel GetSaleByData(string data) + { + _logger.LogInformation("Get element by data: {data}", data); + if (data.IsEmpty()) + { + throw new ArgumentNullException(nameof(data)); + } + if (!data.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + return _saleStorageContract.GetElementById(data) ?? throw new ElementNotFoundException(data); + } + + public void InsertSale(SaleDataModel saleDataModel) + { + _logger.LogInformation("New data: {json}", JsonSerializer.Serialize(saleDataModel)); + ArgumentNullException.ThrowIfNull(saleDataModel); + saleDataModel.Validate(); + _saleStorageContract.AddElement(saleDataModel); + } + + public void CancelSale(string id) + { + _logger.LogInformation("Cancel by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _saleStorageContract.DelElement(id); + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/TourBusinessLogicContract.cs b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/TourBusinessLogicContract.cs new file mode 100644 index 0000000..81cd983 --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/Implementations/TourBusinessLogicContract.cs @@ -0,0 +1,82 @@ +using MagicCarpetContracts.BuisnessLogicContracts; +using MagicCarpetContracts.DataModels; +using MagicCarpetContracts.Extensions; +using MagicCarpetContracts.StoragesContracts; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace MagicCarpetBusinessLogic.Implementations; + +internal class TourBusinessLogicContract(ITourStorageContract tourStorageContract, ILogger logger) : ITourBusinessLogicContract +{ + private readonly ILogger _logger = logger; + private readonly ITourStorageContract _tourStorageContract = tourStorageContract; + public List GetAllTours() + { + _logger.LogInformation("GetAllTours"); + return _tourStorageContract.GetList() ?? throw new NullListException(); + } + + public List GetTourHistoryByTour(string tourId) + { + _logger.LogInformation("GetTourHistoryByTour for {tourId}", tourId); + if (tourId.IsEmpty()) + { + throw new ArgumentNullException(nameof(tourId)); + } + if (!tourId.IsGuid()) + { + throw new ValidationException("The value in the field tourId is not a unique identifier."); + } + return _tourStorageContract.GetHistoryByTourId(tourId) ?? throw new NullListException(); + } + + public TourDataModel GetTourByData(string data) + { + _logger.LogInformation("Get element by data: {data}", data); + if (data.IsEmpty()) + { + throw new ArgumentNullException(nameof(data)); + } + if (data.IsGuid()) + { + return _tourStorageContract.GetElementById(data) ?? throw new ElementNotFoundException(data); + } + return _tourStorageContract.GetElementByName(data) ?? throw new ElementNotFoundException(data); + } + + public void InsertTour(TourDataModel tourDataModel) + { + _logger.LogInformation("New data: {json}", JsonSerializer.Serialize(tourDataModel)); + ArgumentNullException.ThrowIfNull(tourDataModel); + tourDataModel.Validate(); + _tourStorageContract.AddElement(tourDataModel); + } + + public void UpdateTour(TourDataModel tourDataModel) + { + _logger.LogInformation("Update data: {json}", JsonSerializer.Serialize(tourDataModel)); + ArgumentNullException.ThrowIfNull(tourDataModel); + tourDataModel.Validate(); + _tourStorageContract.UpdElement(tourDataModel); + } + + public void DeleteTour(string id) + { + _logger.LogInformation("Delete by id: {id}", id); + if (id.IsEmpty()) + { + throw new ArgumentNullException(nameof(id)); + } + if (!id.IsGuid()) + { + throw new ValidationException("Id is not a unique identifier"); + } + _tourStorageContract.DelElement(id); + } +} diff --git a/MagicCarpetProject/MagicCarpetBusinessLogic/MagicCarpetBusinessLogic.csproj b/MagicCarpetProject/MagicCarpetBusinessLogic/MagicCarpetBusinessLogic.csproj new file mode 100644 index 0000000..88544ab --- /dev/null +++ b/MagicCarpetProject/MagicCarpetBusinessLogic/MagicCarpetBusinessLogic.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IClientBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IClientBusinessLogicContract.cs similarity index 100% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IClientBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IClientBusinessLogicContract.cs diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IEmployeeBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IEmployeeBusinessLogicContract.cs similarity index 100% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IEmployeeBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IEmployeeBusinessLogicContract.cs diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IPostBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IPostBusinessLogicContract.cs similarity index 100% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/IPostBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/IPostBusinessLogicContract.cs diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ISalaryBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ISalaryBusinessLogicContract.cs similarity index 100% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ISalaryBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ISalaryBusinessLogicContract.cs diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ISaleBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ISaleBusinessLogicContract.cs similarity index 100% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ISaleBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ISaleBusinessLogicContract.cs diff --git a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ITourBuisnessLogicContract.cs b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ITourBusinessLogicContract.cs similarity index 86% rename from MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ITourBuisnessLogicContract.cs rename to MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ITourBusinessLogicContract.cs index 7c69d28..b5f1772 100644 --- a/MagicCarpetProject/MagicCarpetContracts/BuisnessLogicContracts/ITourBuisnessLogicContract.cs +++ b/MagicCarpetProject/MagicCarpetContracts/BusinessLogicContracts/ITourBusinessLogicContract.cs @@ -11,7 +11,7 @@ public interface ITourBusinessLogicContract { List GetAllTours(); - List GetTourHistoryByCocktail(string productId); + List GetTourHistoryByTour(string productId); TourDataModel GetTourByData(string data); diff --git a/MagicCarpetProject/MagicCarpetProject.sln b/MagicCarpetProject/MagicCarpetProject.sln index fd8757d..301645e 100644 --- a/MagicCarpetProject/MagicCarpetProject.sln +++ b/MagicCarpetProject/MagicCarpetProject.sln @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicCarpetContracts", "Mag EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicCarpetTests", "MagicCarpetTests\MagicCarpetTests.csproj", "{AD61DB61-6F8B-448F-933E-F9C2C3FA05E4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicCarpetBusinessLogic", "MagicCarpetBusinessLogic\MagicCarpetBusinessLogic.csproj", "{688F9182-851F-4CF8-97CD-9B6F1E43D758}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {AD61DB61-6F8B-448F-933E-F9C2C3FA05E4}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD61DB61-6F8B-448F-933E-F9C2C3FA05E4}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD61DB61-6F8B-448F-933E-F9C2C3FA05E4}.Release|Any CPU.Build.0 = Release|Any CPU + {688F9182-851F-4CF8-97CD-9B6F1E43D758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {688F9182-851F-4CF8-97CD-9B6F1E43D758}.Debug|Any CPU.Build.0 = Debug|Any CPU + {688F9182-851F-4CF8-97CD-9B6F1E43D758}.Release|Any CPU.ActiveCfg = Release|Any CPU + {688F9182-851F-4CF8-97CD-9B6F1E43D758}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE