diff --git a/api-farmacia/Data/Data.csproj b/api-farmacia/Data/Data.csproj index c2ecaa3..4dbc024 100644 --- a/api-farmacia/Data/Data.csproj +++ b/api-farmacia/Data/Data.csproj @@ -7,7 +7,8 @@ - + + diff --git a/api-farmacia/Logic/Driver/DriverService.cs b/api-farmacia/Logic/Driver/DriverService.cs new file mode 100644 index 0000000..2d644e3 --- /dev/null +++ b/api-farmacia/Logic/Driver/DriverService.cs @@ -0,0 +1,38 @@ +using System; +using Data.Driver; +using System.Data; + +namespace Logic.Driver +{ + public class DriverService + { + private DriverRepository repository; + + public DataSet List() + { + return this.repository.list(); + } + + public bool update(int id_driver, int identification_driver, string numberLicense_driver, + string name_driver, string surname_driver, int phone_driver, int age_driver, char gender_driver, + string typeLicense) + { + return this.repository.update(id_driver, identification_driver, numberLicense_driver, + name_driver, surname_driver, phone_driver, age_driver, gender_driver, typeLicense); + } + + public bool insert(int identification_driver, string numberLicense_driver, + string name_driver, string surname_driver, int phone_driver, int age_driver, char gender_driver, + string typeLicense) + { + return this.repository.insert(identification_driver, numberLicense_driver, name_driver, surname_driver, + phone_driver, age_driver, gender_driver, typeLicense); + } + + public bool delete(int id_driver) + { + return this.repository.delete(id_driver); + } + } +} + diff --git a/api-farmacia/Logic/Logic.csproj b/api-farmacia/Logic/Logic.csproj index eb2460e..719a8a8 100644 --- a/api-farmacia/Logic/Logic.csproj +++ b/api-farmacia/Logic/Logic.csproj @@ -6,4 +6,19 @@ enable + + + + + + + + + + + + + + + diff --git a/api-farmacia/Logic/Providers/ProvidersService.cs b/api-farmacia/Logic/Providers/ProvidersService.cs new file mode 100644 index 0000000..dda031e --- /dev/null +++ b/api-farmacia/Logic/Providers/ProvidersService.cs @@ -0,0 +1,32 @@ +using System; +using System.Data; + +namespace Logic.Providers +{ + public class ProvidersService + { + private ProvidersService Repository; + + public DataSet list() + { + return this.Repository.list(); + } + + public bool update(int id_provider, int nit_provider, string name_provider, string city_provider) + { + return this.Repository.update(id_provider, nit_provider, name_provider, city_provider); + } + + public bool insert(int nit_provider, string name_provider, string city_provider) + { + return this.Repository.insert(nit_provider, name_provider, city_provider); + } + + public bool delete(int id_provider) + { + return this.Repository.delete(id_provider); + } + + } +} +