Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/far 14 logic providers drl #10

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api-farmacia/Data/Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MySql.Data" Version="8.0.32.1" />
<PackageReference Include="MySql.Data" Version="8.0.33" />
<PackageReference Include="MySqlConnector" Version="2.2.5" />
</ItemGroup>

</Project>
38 changes: 38 additions & 0 deletions api-farmacia/Logic/Driver/DriverService.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}

15 changes: 15 additions & 0 deletions api-farmacia/Logic/Logic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,19 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<None Remove="Driver\" />
<None Remove="Providers\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Driver\" />
<Folder Include="Providers\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Data\Data.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySql.Data" Version="8.0.33" />
<PackageReference Include="MySqlConnector" Version="2.2.5" />
</ItemGroup>
</Project>
32 changes: 32 additions & 0 deletions api-farmacia/Logic/Providers/ProvidersService.cs
Original file line number Diff line number Diff line change
@@ -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);
}

}
}