правки
This commit is contained in:
parent
65decf8f3f
commit
0e7a46e2e1
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyDataModels.Models;
|
||||
using LawCompanyContracts.BindingModels;
|
||||
using LawCompanyContracts.SearchModels;
|
||||
using LawCompanyContracts.ViewModels;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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; }
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public class IHearingStorage
|
||||
public interface IHearingStorage
|
||||
{
|
||||
List<HearingViewModel> GetFullList();
|
||||
List<HearingViewModel> GetFilteredList(HearingSearchModel model);
|
||||
|
@ -4,7 +4,7 @@ using LawCompanyContracts.ViewModels;
|
||||
|
||||
namespace LawCompanyContracts.StoragesContracts
|
||||
{
|
||||
public class ILawyerStorage
|
||||
public interface ILawyerStorage
|
||||
{
|
||||
List<LawyerViewModel> GetFullList();
|
||||
List<LawyerViewModel> GetFilteredList(LawyerSearchModel model);
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user