Compare commits
16 Commits
df7c3638e5
...
4423570f6a
Author | SHA1 | Date | |
---|---|---|---|
|
4423570f6a | ||
|
2d4c654b8d | ||
|
6ac5f98575 | ||
|
fb45688251 | ||
|
7a5d3f7982 | ||
|
31177318af | ||
|
68831c48fd | ||
|
ae8ed1c371 | ||
|
82ed6d62e3 | ||
|
fc085d8dca | ||
|
2441164c16 | ||
|
4742a21921 | ||
|
0b6b6fe1c6 | ||
|
dc76cd8ef9 | ||
|
41c847f51e | ||
|
902e3fd8ac |
@ -13,23 +13,22 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="NLog" Version="5.2.8" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
<PackageReference Include="ReportViewerCore.WinForms" Version="15.1.19" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LawFirmBusinessLogic\LawFirmBusinessLogic.csproj" />
|
||||
<ProjectReference Include="..\LawFirmContracts\LawFirmContracts.csproj" />
|
||||
<ProjectReference Include="..\LawFirmDatabaseImplement\LawFirmDatabaseImplement.csproj" />
|
||||
<ProjectReference Include="..\LawFirmFileImplement\LawFirmFileImplement.csproj" />
|
||||
<ProjectReference Include="..\LawFirmListImplement\LawFirmListImplement.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="ReportOrders.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -8,19 +8,12 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="PDFsharp-MigraDoc-GDI" Version="1.50.5147" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LawFirmContracts\LawFirmContracts.csproj" />
|
||||
<ProjectReference Include="..\LawFirmDataModels\LawFirmDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -6,4 +6,4 @@ namespace LawFirmClientApp.Models
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
}
|
@ -5,5 +5,6 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"IPAddress": "http://localhost:5134/"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
@ -6,15 +6,6 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LawFirmDataModels\LawFirmDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
@ -6,13 +6,4 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -16,19 +16,6 @@ namespace LawFirmDatabaseImplement.Implements
|
||||
{
|
||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||
{
|
||||
/*if (!model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
using var context = new LawFirmDatabase();
|
||||
return context.Orders
|
||||
.Include(x => x.Document)
|
||||
.Include(x => x.Client)
|
||||
.Include(x => x.Implementer)
|
||||
.FirstOrDefault(x =>
|
||||
(model.Status == null || model.Status != null && model.Status.Contains(x.Status)) &&
|
||||
model.ImplementerId.HasValue && x.ImplementerId == model.ImplementerId ||
|
||||
model.Id.HasValue && x.Id == model.Id)?.GetViewModel;*/
|
||||
if (!model.Id.HasValue && (!model.ImplementerId.HasValue || !model.Status.HasValue))
|
||||
{
|
||||
return null;
|
||||
|
@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace LawFirmDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(LawFirmDatabase))]
|
||||
[Migration("20240510203333_InitialCreate")]
|
||||
[Migration("20240616172608_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
@ -0,0 +1,254 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LawFirmDatabaseImplement;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LawFirmDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(LawFirmDatabase))]
|
||||
partial class LawFirmDatabaseModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ClientFIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Clients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Component", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ComponentName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Cost")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Components");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Document", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("DocumentName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<double>("Price")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Documents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.DocumentComponent", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ComponentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DocumentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ComponentId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.ToTable("DocumentComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("ImplementerFIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Qualification")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WorkExperience")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Implementers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Count")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateCreate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateImplement")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("DocumentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("ImplementerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Sum")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("ImplementerId");
|
||||
|
||||
b.ToTable("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.DocumentComponent", b =>
|
||||
{
|
||||
b.HasOne("LawFirmDatabaseImplement.Models.Component", "Component")
|
||||
.WithMany("DocumentComponents")
|
||||
.HasForeignKey("ComponentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LawFirmDatabaseImplement.Models.Document", "Document")
|
||||
.WithMany("Components")
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Component");
|
||||
|
||||
b.Navigation("Document");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Order", b =>
|
||||
{
|
||||
b.HasOne("LawFirmDatabaseImplement.Models.Client", "Client")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LawFirmDatabaseImplement.Models.Document", "Document")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("DocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LawFirmDatabaseImplement.Models.Implementer", "Implementer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("ImplementerId");
|
||||
|
||||
b.Navigation("Client");
|
||||
|
||||
b.Navigation("Document");
|
||||
|
||||
b.Navigation("Implementer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Client", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Component", b =>
|
||||
{
|
||||
b.Navigation("DocumentComponents");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Document", b =>
|
||||
{
|
||||
b.Navigation("Components");
|
||||
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LawFirmDatabaseImplement.Models.Implementer", b =>
|
||||
{
|
||||
b.Navigation("Orders");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -75,26 +75,6 @@ namespace LawFirmListImplement.Implements
|
||||
}
|
||||
public OrderViewModel? GetElement(OrderSearchModel model)
|
||||
{
|
||||
/*if (!model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
foreach (var order in _source.Orders)
|
||||
{
|
||||
if (model.Id.HasValue && order.Id == model.Id)
|
||||
{
|
||||
return order.GetViewModel;
|
||||
}
|
||||
else if (model.ImplementerId.HasValue && model.Status != null && order.ImplementerId == model.ImplementerId && model.Status.Contains(order.Status))
|
||||
{
|
||||
return GetViewModel(order);
|
||||
}
|
||||
else if (model.ImplementerId.HasValue && model.ImplementerId == order.ImplementerId)
|
||||
{
|
||||
return GetViewModel(order);
|
||||
}
|
||||
}
|
||||
return null;*/
|
||||
if (!model.Id.HasValue)
|
||||
{
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user