diff --git a/LawFirm/LawFirm.sln b/LawFirm/LawFirm.sln
index 1316b66..7c4198c 100644
--- a/LawFirm/LawFirm.sln
+++ b/LawFirm/LawFirm.sln
@@ -3,15 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmView", "LawFirm\LawFirmView.csproj", "{599A2ED4-41F4-4D39-8A30-9474710AC617}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmContracts", "LawFirmContracts\LawFirmContracts.csproj", "{E2306BF5-FCE9-4195-85BF-22C35495A8D0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmContracts", "LawFirmContracts\LawFirmContracts.csproj", "{E2306BF5-FCE9-4195-85BF-22C35495A8D0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmBusinessLogic", "LawFirmBusinessLogic\LawFirmBusinessLogic.csproj", "{08E0AB8D-1F53-4757-BA64-D76A2EB866C0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmBusinessLogic", "LawFirmBusinessLogic\LawFirmBusinessLogic.csproj", "{08E0AB8D-1F53-4757-BA64-D76A2EB866C0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmDatabase", "LawFirmDatabase\LawFirmDatabase.csproj", "{A05000F4-BF89-4515-A8C7-FB5D962E3802}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmDatabase", "LawFirmDatabase\LawFirmDatabase.csproj", "{A05000F4-BF89-4515-A8C7-FB5D962E3802}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmWebApp", "LawFirmWebApp\LawFirmWebApp.csproj", "{8D397FC2-D414-4524-B7EE-1534013E8FE6}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmWebApp", "LawFirmWebApp\LawFirmWebApp.csproj", "{8D397FC2-D414-4524-B7EE-1534013E8FE6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,10 +17,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {599A2ED4-41F4-4D39-8A30-9474710AC617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {599A2ED4-41F4-4D39-8A30-9474710AC617}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {599A2ED4-41F4-4D39-8A30-9474710AC617}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {599A2ED4-41F4-4D39-8A30-9474710AC617}.Release|Any CPU.Build.0 = Release|Any CPU
{E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2306BF5-FCE9-4195-85BF-22C35495A8D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs
index 5d1b95d..c5196cc 100644
--- a/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs
+++ b/LawFirm/LawFirmContracts/BindingModels/CaseBindingModel.cs
@@ -13,5 +13,7 @@ namespace LawFirmContracts.BindingModels
public string Name { get; set; } = string.Empty;
public DateTime DateCreated { get; set; } = DateTime.Now;
public int CustomerId { get; set; }
+ public int WorkerId { get; set; }
+ public int PaymentId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/BindingModels/CaseServiceBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/CaseServiceBindingModel.cs
index a0898b5..eab6b03 100644
--- a/LawFirm/LawFirmContracts/BindingModels/CaseServiceBindingModel.cs
+++ b/LawFirm/LawFirmContracts/BindingModels/CaseServiceBindingModel.cs
@@ -12,6 +12,7 @@ namespace LawFirmContracts.BindingModels
public int Id { get; set; }
public int CaseId { get; set; }
public int ServiceId { get; set; }
+ public int PaymentId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs
index 915d389..93b4929 100644
--- a/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs
+++ b/LawFirm/LawFirmContracts/BindingModels/ItemBindingModel.cs
@@ -12,6 +12,7 @@ namespace LawFirmContracts.BindingModels
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
+ public int CaseId { get; set; }
public int PaymentId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs b/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs
index bd2e2c4..ba58f08 100644
--- a/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs
+++ b/LawFirm/LawFirmContracts/BindingModels/PaymentBindingModel.cs
@@ -13,5 +13,6 @@ namespace LawFirmContracts.BindingModels
public DateTime DatePayment { get; set; }
public decimal Sum { get; set; }
public int CaseId { get; set; }
+ public int CaseServiceId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/Models/IPaymentModel.cs b/LawFirm/LawFirmContracts/Models/IPaymentModel.cs
index b689c19..3efb10f 100644
--- a/LawFirm/LawFirmContracts/Models/IPaymentModel.cs
+++ b/LawFirm/LawFirmContracts/Models/IPaymentModel.cs
@@ -20,9 +20,12 @@ namespace LawFirmContracts.Models
/// Сумма оплаты
///
decimal Sum { get; }
+ int CaseId { get; }
+
///
/// Id дела
///
- int CaseId { get; }
+ // int CaseId { get; }
+ // int CaseServiceId { get; }
}
}
diff --git a/LawFirm/LawFirmContracts/Models/IServiceModel.cs b/LawFirm/LawFirmContracts/Models/IServiceModel.cs
index 3754cb0..f81f710 100644
--- a/LawFirm/LawFirmContracts/Models/IServiceModel.cs
+++ b/LawFirm/LawFirmContracts/Models/IServiceModel.cs
@@ -17,13 +17,10 @@ namespace LawFirmContracts.Models
/// Цена
///
decimal Price { get; }
+ int CaseId { get; }
+
///
/// Id статьи затрат
///
- int ItemId { get; }
- ///
- /// Id дела
- ///
- int CaseId { get; }
}
}
diff --git a/LawFirm/LawFirmContracts/ViewModels/CaseServiceViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/CaseServiceViewModel.cs
index c1e03af..8f71ace 100644
--- a/LawFirm/LawFirmContracts/ViewModels/CaseServiceViewModel.cs
+++ b/LawFirm/LawFirmContracts/ViewModels/CaseServiceViewModel.cs
@@ -12,5 +12,6 @@ namespace LawFirmContracts.ViewModels
public int Id { get; set; }
public int CaseId { get; set; }
public int ServiceId { get; set; }
+ public int PaymentId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs
index d86f7b5..786ca28 100644
--- a/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs
+++ b/LawFirm/LawFirmContracts/ViewModels/ItemViewModel.cs
@@ -15,6 +15,7 @@ namespace LawFirmContracts.ViewModels
public string Name { get; set; } = string.Empty;
[DisplayName("Цена")]
public decimal Price { get; set; }
+ public int CaseId { get; set; }
public int PaymentId { get; set; }
}
}
diff --git a/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs b/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs
index 6cc0def..57d5c6e 100644
--- a/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs
+++ b/LawFirm/LawFirmContracts/ViewModels/PaymentViewModel.cs
@@ -16,5 +16,6 @@ namespace LawFirmContracts.ViewModels
[DisplayName("Сумма")]
public decimal Sum { get; set; }
public int CaseId { get; set; }
+ public int CaseServiceId { get; set; }
}
}
diff --git a/LawFirm/LawFirmDatabase/LawFirmDBContext.cs b/LawFirm/LawFirmDatabase/LawFirmDBContext.cs
index c427529..6adb71c 100644
--- a/LawFirm/LawFirmDatabase/LawFirmDBContext.cs
+++ b/LawFirm/LawFirmDatabase/LawFirmDBContext.cs
@@ -17,7 +17,7 @@ namespace LawFirmDatabase
optionsBuilder.UseSqlServer
(
@"Data Source=KITOSYA;
- Initial Catalog=AircraftPlantDataBaseFull;
+ Initial Catalog=Kursovaya;
Integrated Security=True;
MultipleActiveResultSets=True;;
TrustServerCertificate=True"
diff --git a/LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.Designer.cs b/LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.Designer.cs
similarity index 99%
rename from LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.Designer.cs
rename to LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.Designer.cs
index 12a0a78..62d698e 100644
--- a/LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.Designer.cs
+++ b/LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.Designer.cs
@@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace LawFirmDatabase.Migrations
{
[DbContext(typeof(LawFirmDBContext))]
- [Migration("20230408133321_InitialCreate")]
- partial class InitialCreate
+ [Migration("20230408215635_InitMigration")]
+ partial class InitMigration
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
diff --git a/LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.cs b/LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.cs
similarity index 99%
rename from LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.cs
rename to LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.cs
index a7b7acb..f246ae1 100644
--- a/LawFirm/LawFirmDatabase/Migrations/20230408133321_InitialCreate.cs
+++ b/LawFirm/LawFirmDatabase/Migrations/20230408215635_InitMigration.cs
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace LawFirmDatabase.Migrations
{
///
- public partial class InitialCreate : Migration
+ public partial class InitMigration : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/LawFirm/LawFirmDatabase/Models/Case.cs b/LawFirm/LawFirmDatabase/Models/Case.cs
index 27b4025..ae529aa 100644
--- a/LawFirm/LawFirmDatabase/Models/Case.cs
+++ b/LawFirm/LawFirmDatabase/Models/Case.cs
@@ -35,7 +35,7 @@ namespace LawFirmDatabase.Models
}
return new()
{
- Name= model.Name,
+ Name = model.Name,
DateCreated = model.DateCreated,
Customer = context.Customers.First(x => x.Id == model.CustomerId)
};
@@ -55,7 +55,7 @@ namespace LawFirmDatabase.Models
public CaseViewModel GetViewModel => new()
{
Id = Id,
- Name= Name,
+ Name = Name,
DateCreated = DateCreated,
CustomerId = CustomerId
};