правки

This commit is contained in:
Софья Якобчук 2024-05-01 23:48:28 +04:00
parent 65decf8f3f
commit 0e7a46e2e1
28 changed files with 725 additions and 770 deletions

View File

@ -142,8 +142,6 @@ namespace LawCompanyBusinessLogic.BusinessLogics
FIO = model.FIO,
Phone = model.Phone,
Email = model.Email,
ExecutorId = model.ExecutorId,
});
if (element != null && element.Id != model.Id)
{

View File

@ -1,9 +1,9 @@
using LawCompanyContracts.BindingModels;
using LawCompanyDataModels.Models;
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.BusinessLogicContracts;
using LawCompanyContracts.SearchModels;
using LawCompanyContracts.StoragesContracts;
using LawCompanyContracts.ViewModels;
using LawCompanyDataModels.Models;
using Microsoft.Extensions.Logging;
namespace LawCompanyBusinessLogic.BusinessLogics

View File

@ -17,7 +17,7 @@ namespace LawCompanyBusinessLogic.BusinessLogics
private readonly ILogger _logger;
private readonly IExecutorStorage _executorStorage;
public ExecutorLogic(ILogger logger, IExecutorStorage executorStorage)
public ExecutorLogic(ILogger<ExecutorLogic> logger, IExecutorStorage executorStorage)
{
_logger = logger;
_executorStorage = executorStorage;

View File

@ -12,7 +12,7 @@ namespace LawCompanyBusinessLogic.BusinessLogics
private readonly ILogger _logger;
private readonly IGuarantorStorage _guarantorStorage;
public GuarantorLogic(ILogger logger, IGuarantorStorage guarantorStorage)
public GuarantorLogic(ILogger<GuarantorLogic> logger, IGuarantorStorage guarantorStorage)
{
_logger = logger;
_guarantorStorage = guarantorStorage;

View File

@ -142,7 +142,6 @@ namespace LawCompanyBusinessLogic.BusinessLogics
FIO = model.FIO,
Phone = model.Phone,
Email = model.Email,
GuarantorId = model.GuarantorId,
});
if (element != null && element.Id != model.Id)

View File

@ -1,5 +1,5 @@
using LawCompanyContracts.BindingModels;
using LawCompanyDataModels.Models;
using LawCompanyDataModels.Models;
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.SearchModels;
using LawCompanyContracts.ViewModels;

View File

@ -1,11 +1,6 @@
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.SearchModels;
using LawCompanyContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.BusinessLogicContracts
{

View File

@ -1,12 +1,7 @@
using LawCompanyContracts.BindingModels;
using LawCompanyDataModels.Models;
using LawCompanyDataModels.Models;
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.SearchModels;
using LawCompanyContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.BusinessLogicContracts
{

View File

@ -1,11 +1,6 @@
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.SearchModels;
using LawCompanyContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.BusinessLogicContracts
{

View File

@ -5,6 +5,8 @@
public int? Id { get; set; }
public double? Cost { get; set; }
public DateTime? ConsultationDate { get; set; }
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
public int? CaseId { get; set; }
public int? GuarantorId { get; set; }
}

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.SearchModels
namespace LawCompanyContracts.SearchModels
{
public class GuarantorSearchModel
{

View File

@ -1,15 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.SearchModels
namespace LawCompanyContracts.SearchModels
{
public class HearingSearchModel
{
public int? Id { get; set; }
public DateTime? HearingDate { get; set; }
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
public int? GuarantorId { get; set; }
}
}

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.SearchModels
namespace LawCompanyContracts.SearchModels
{
public class LawyerSearchModel
{

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyContracts.SearchModels
namespace LawCompanyContracts.SearchModels
{
public class VisitSearchModel
{

View File

@ -4,7 +4,7 @@ using LawCompanyContracts.ViewModels;
namespace LawCompanyContracts.StoragesContracts
{
public class IHearingStorage
public interface IHearingStorage
{
List<HearingViewModel> GetFullList();
List<HearingViewModel> GetFilteredList(HearingSearchModel model);

View File

@ -4,7 +4,7 @@ using LawCompanyContracts.ViewModels;
namespace LawCompanyContracts.StoragesContracts
{
public class ILawyerStorage
public interface ILawyerStorage
{
List<LawyerViewModel> GetFullList();
List<LawyerViewModel> GetFilteredList(LawyerSearchModel model);

View File

@ -14,8 +14,6 @@ namespace LawCompanyContracts.ViewModels
[DisplayName("Дело")]
public string CaseName { get; set; } = string.Empty;
public int CaseId { get; set; }
[DisplayName("Имя поручителя")]
public string GuarantorName { get; set; } = string.Empty;
public int GuarantorId { get; set; }
public Dictionary<int, ILawyerModel> ConsultationLawyers { get; set; } = new();
}

View File

@ -3,11 +3,6 @@ using LawCompanyContracts.SearchModels;
using LawCompanyContracts.StoragesContracts;
using LawCompanyContracts.ViewModels;
using LawCompanyDatabaseImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawCompanyDatabaseImplement.Implements
{
@ -64,7 +59,7 @@ namespace LawCompanyDatabaseImplement.Implements
public GuarantorViewModel? Insert(GuarantorBindingModel model)
{
using var context = new LawCompanyDatabase();
var newGuarantor = Guarantor.Create(model);
var newGuarantor = Guarantor.Create(context, model);
if (newGuarantor == null)
{
return null;

View File

@ -61,7 +61,7 @@ namespace LawCompanyDatabaseImplement.Implements
public LawyerViewModel? Insert(LawyerBindingModel model)
{
using var context = new LawCompanyDatabase();
var newLawyer = Lawyer.Create(model);
var newLawyer = Lawyer.Create(context, model);
if (newLawyer == null)
{
return null;

View File

@ -3,7 +3,7 @@ using LawCompanyContracts.BindingModels;
using LawCompanyContracts.ViewModels;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using LawFirmDatabaseImplement.Models;
using LawCompanyDatabaseImplement.Models;
namespace LawCompanyDatabaseImplement.Models
{