-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Candidato Antlia
committed
Apr 4, 2019
1 parent
633f610
commit 0c90f3c
Showing
73 changed files
with
40,188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.28307.271 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 - UI", "1 - UI", "{14776C96-138D-4CB9-B641-351C92593001}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 - Domain", "2 - Domain", "{2A99158F-C275-4211-9AF0-27E5D6C74994}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 -Infrastructure", "3 -Infrastructure", "{C586434E-0DFA-4905-80E0-2A7D6CBBDD14}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovimentosManuais.InfraStruture", "src\MovimentosManuais.InfraStruture\MovimentosManuais.InfraStruture.csproj", "{D95EB535-F7EF-4255-9AB6-283D91A465C3}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MovimentosManuais.ApplicationCore", "src\MovimentosManuais.ApplicationCore\MovimentosManuais.ApplicationCore.csproj", "{AD4695C4-62A1-484D-9195-0A0BB762EEDE}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4 - Api", "4 - Api", "{3521BA3E-892C-4D8A-9C0B-F388E94A22D2}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovimentosManuais.Api", "src\MovimentosManuais.Api\MovimentosManuais.Api.csproj", "{C1CE6423-A5D3-4724-9F15-129210E3BFBD}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MovimentosManuais.UI", "src\MovimentosManuais.UI\MovimentosManuais.UI.csproj", "{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D95EB535-F7EF-4255-9AB6-283D91A465C3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{AD4695C4-62A1-484D-9195-0A0BB762EEDE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{C1CE6423-A5D3-4724-9F15-129210E3BFBD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{D95EB535-F7EF-4255-9AB6-283D91A465C3} = {C586434E-0DFA-4905-80E0-2A7D6CBBDD14} | ||
{AD4695C4-62A1-484D-9195-0A0BB762EEDE} = {2A99158F-C275-4211-9AF0-27E5D6C74994} | ||
{C1CE6423-A5D3-4724-9F15-129210E3BFBD} = {3521BA3E-892C-4D8A-9C0B-F388E94A22D2} | ||
{2B354FF4-85D1-44DB-AE31-11AE96B1F8CB} = {14776C96-138D-4CB9-B641-351C92593001} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {C25CB48F-085F-449C-AC93-014422F0ED5C} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.2</TargetFramework> | ||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.App" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /> | ||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MovimentosManuais.ApplicationCore\MovimentosManuais.ApplicationCore.csproj" /> | ||
<ProjectReference Include="..\MovimentosManuais.InfraStruture\MovimentosManuais.InfraStruture.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Controllers\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace MovimentosManuais.Api | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateWebHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | ||
WebHost.CreateDefaultBuilder(args) | ||
.UseStartup<Startup>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json.schemastore.org/launchsettings.json", | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:1269", | ||
"sslPort": 44388 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"MovimentosManuais.Api": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"applicationUrl": "https://localhost:5001;http://localhost:5000", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using MovimentosManuais.InfraStruture.Data; | ||
|
||
namespace MovimentosManuais.Api | ||
{ | ||
public class Startup | ||
{ | ||
public Startup(IConfiguration configuration) | ||
{ | ||
Configuration = configuration; | ||
} | ||
|
||
public IConfiguration Configuration { get; } | ||
|
||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); | ||
|
||
services.AddDbContext<MovimentosManuaisContext>(options => | ||
options.UseSqlServer(Configuration.GetConnectionString("DataBaseConnection"))); | ||
} | ||
|
||
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | ||
{ | ||
app.UseMvc(routes => | ||
{ | ||
routes.MapRoute( | ||
name: "default", | ||
template: "{controller=Home}/{action=Index}/{id?}"); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Debug", | ||
"System": "Information", | ||
"Microsoft": "Information" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Warning" | ||
} | ||
}, | ||
|
||
"ConnectionStrings": { | ||
"DataBaseConnection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=MovimentosManuais;Integrated Security=SSPI;" | ||
}, | ||
|
||
"AllowedHosts": "*" | ||
} |
23 changes: 23 additions & 0 deletions
23
src/MovimentosManuais.ApplicationCore/Entity/Movimento_Manual.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MovimentosManuais.ApplicationCore.Entity | ||
{ | ||
public class Movimento_Manual | ||
{ | ||
public Movimento_Manual() | ||
{ | ||
|
||
} | ||
public int DAT_MES { get; set; } | ||
public int DAT_ANO { get; set; } | ||
public int NUM_LANCAMENTO { get; set; } | ||
public int COD_PRODUTO { get; set; } | ||
public int COD_COSIF { get; set; } | ||
public int DES_DESCRICAO { get; set; } | ||
public int DAT_MOVIMENTO { get; set; } | ||
public int COD_USUARIO { get; set; } | ||
public int VAL_VALOR { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MovimentosManuais.ApplicationCore.Entity | ||
{ | ||
public class Produto | ||
{ | ||
public Produto() | ||
{ | ||
|
||
} | ||
|
||
public string COD_PRODUTO { get; set; } | ||
public string DES_PRODUTO { get; set; } | ||
public string STA_STATUS { get; set; } | ||
public ICollection<Produto_Cosif> Produto_Cosifs { get; set; } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/MovimentosManuais.ApplicationCore/Entity/Produto_Cosif.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MovimentosManuais.ApplicationCore.Entity | ||
{ | ||
public class Produto_Cosif | ||
{ | ||
public Produto_Cosif() | ||
{ | ||
|
||
} | ||
|
||
public string COD_PRODUTO { get; set; } | ||
public string COD_COSIF { get; set; } | ||
public string COD_CLASSIFICACAO { get; set; } | ||
public string STA_STATUS { get; set; } | ||
public ICollection<Movimento_Manual> Contatos { get; set; } | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/MovimentosManuais.ApplicationCore/Interfaces/Repository/IRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq.Expressions; | ||
|
||
namespace MovimentosManuais.ApplicationCore.Interfaces.Repository | ||
{ | ||
public interface IRepository<TEntity> where TEntity : class | ||
{ | ||
TEntity Adicionar(TEntity entity); | ||
void Atualizar(TEntity entity); | ||
IEnumerable<TEntity> ObterTodos(); | ||
TEntity ObterId(int Id); | ||
IEnumerable<TEntity> Buscar(Expression<Func<TEntity, bool>> predicado); | ||
void Remover(TEntity entity); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/MovimentosManuais.ApplicationCore/Interfaces/Services/IProdutoService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using MovimentosManuais.ApplicationCore.Entity; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq.Expressions; | ||
|
||
namespace MovimentosManuais.ApplicationCore.Interfaces.Services | ||
{ | ||
public interface IProdutoService | ||
{ | ||
Produto Adicionar(Produto entity); | ||
void Atualizar(Produto entity); | ||
IEnumerable<Produto> ObterTodos(); | ||
Produto ObterId(int Id); | ||
IEnumerable<Produto> Buscar(Expression<Func<Produto, bool>> predicado); | ||
void Remover(Produto entity); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/MovimentosManuais.ApplicationCore/MovimentosManuais.ApplicationCore.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Services\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Linq; | ||
|
||
namespace MovimentosManuais.InfraStruture.Data | ||
{ | ||
public class DbInitializer | ||
{ | ||
public DbInitializer(MovimentosManuaisContext context) | ||
{ | ||
if (context.MovimentosManuais.Any()) | ||
{ | ||
return; | ||
} | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/MovimentosManuais.InfraStruture/Data/MovimentosManuaisContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using MovimentosManuais.ApplicationCore.Entity; | ||
using MovimentosManuais.InfraStruture.EntityConfig; | ||
|
||
namespace MovimentosManuais.InfraStruture.Data | ||
{ | ||
public class MovimentosManuaisContext : DbContext | ||
{ | ||
public MovimentosManuaisContext(DbContextOptions<MovimentosManuaisContext> options) : base(options) | ||
{ | ||
|
||
} | ||
|
||
public DbSet<Produto> Produtos { get; set; } | ||
public DbSet<Produto_Cosif> Produto_Cosifs { get; set; } | ||
public DbSet<Movimento_Manual> MovimentosManuais { get; set; } | ||
|
||
protected override void OnModelCreating(ModelBuilder builder) | ||
{ | ||
//Add name tables | ||
builder.Entity<Produto>().ToTable("PRODUTO"); | ||
builder.Entity<Produto_Cosif>().ToTable("PRODUTO_COSIF"); | ||
builder.Entity<Movimento_Manual>().ToTable("MOVIMENTO_MANUAL"); | ||
|
||
//Mapping tables .... | ||
builder.ApplyConfiguration(new Movimento_ManualMap()); | ||
builder.ApplyConfiguration(new Produto_CosifMap()); | ||
builder.ApplyConfiguration(new ProdutoMap()); | ||
} | ||
} | ||
} |
Oops, something went wrong.