Добавление слоя контрактов
This commit is contained in:
parent
aaff2b4674
commit
f053f70389
22
Subd/Contracts/BindingModels/CarBM.cs
Normal file
22
Subd/Contracts/BindingModels/CarBM.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class CarBM : ICar
|
||||
{
|
||||
public string Model { get; set; } = string.Empty;
|
||||
|
||||
public int Tonnage { get; set; }
|
||||
|
||||
public int StatusId { get; set; }
|
||||
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
20
Subd/Contracts/BindingModels/CompanyBM.cs
Normal file
20
Subd/Contracts/BindingModels/CompanyBM.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class CompanyBM : ICompany
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int StatusId {get; set; }
|
||||
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
22
Subd/Contracts/BindingModels/HumanBM.cs
Normal file
22
Subd/Contracts/BindingModels/HumanBM.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class HumanBM : IHuman
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
|
||||
public int StatusId { get; set; }
|
||||
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
16
Subd/Contracts/BindingModels/PlaceBM.cs
Normal file
16
Subd/Contracts/BindingModels/PlaceBM.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class PlaceBM : IPlace
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
22
Subd/Contracts/BindingModels/RouteBM.cs
Normal file
22
Subd/Contracts/BindingModels/RouteBM.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class RouteBM : IRoute
|
||||
{
|
||||
public int PlaceStart { get; set; }
|
||||
|
||||
public int PlaceEnd { get; set; }
|
||||
|
||||
public int Length { get; set; }
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
16
Subd/Contracts/BindingModels/StatusBM.cs
Normal file
16
Subd/Contracts/BindingModels/StatusBM.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class StatusBM : IStatus
|
||||
{
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int Id {get; set;}
|
||||
}
|
||||
}
|
32
Subd/Contracts/BindingModels/VoyageBM.cs
Normal file
32
Subd/Contracts/BindingModels/VoyageBM.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModels
|
||||
{
|
||||
public class VoyageBM : IVoyage
|
||||
{
|
||||
public int CarId { get; set; }
|
||||
|
||||
public string CarName { get; set; } = string.Empty;
|
||||
|
||||
public int HumanId { get; set; }
|
||||
|
||||
public string HumanName { get; set; } = string.Empty;
|
||||
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
public int RouteId { get; set; }
|
||||
|
||||
public DateTime DateStart { get; set; }
|
||||
|
||||
public DateTime DateEnd { get; set; }
|
||||
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/ICarLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/ICarLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface ICarLogic
|
||||
{
|
||||
List<CarVM>? ReadList(CarSM model);
|
||||
CarVM? ReadElement(CarSM model);
|
||||
bool Create(CarBM model);
|
||||
bool Update(CarBM model);
|
||||
bool Delete(CarBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/ICompanyLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/ICompanyLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface ICompanyLogic
|
||||
{
|
||||
List<CompanyVM>? ReadList(CompanySM model);
|
||||
CompanyVM? ReadElement(CompanySM model);
|
||||
bool Create(CompanyBM model);
|
||||
bool Update(CompanyBM model);
|
||||
bool Delete(CompanyBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/IHumanLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/IHumanLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface IHumanLogic
|
||||
{
|
||||
List<HumanVM>? ReadList(HumanSM model);
|
||||
HumanVM? ReadElement(HumanSM model);
|
||||
bool Create(HumanBM model);
|
||||
bool Update(HumanBM model);
|
||||
bool Delete(HumanBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/IPlaceLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/IPlaceLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface IPlaceLogic
|
||||
{
|
||||
List<PlaceVM>? ReadList(PlaceSM model);
|
||||
PlaceVM? ReadElement(PlaceSM model);
|
||||
bool Create(PlaceBM model);
|
||||
bool Update(PlaceBM model);
|
||||
bool Delete(PlaceBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/IRouteLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/IRouteLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface IRouteLogic
|
||||
{
|
||||
List<RouteVM>? ReadList(RouteSM model);
|
||||
RouteVM? ReadElement(RouteSM model);
|
||||
bool Create(RouteBM model);
|
||||
bool Update(RouteBM model);
|
||||
bool Delete(RouteBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/IStatusLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/IStatusLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface IStatusLogic
|
||||
{
|
||||
List<StatusVM>? ReadList();
|
||||
StatusVM? ReadElement(StatusSM model);
|
||||
bool Create(StatusBM model);
|
||||
bool Update(StatusBM model);
|
||||
bool Delete(StatusBM model);
|
||||
}
|
||||
}
|
20
Subd/Contracts/BusinessLogic/IVoyageLogic.cs
Normal file
20
Subd/Contracts/BusinessLogic/IVoyageLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BusinessLogic
|
||||
{
|
||||
public interface IVoyageLogic
|
||||
{
|
||||
List<VoyageVM>? ReadList(VoyageSM model);
|
||||
VoyageVM? ReadElement(VoyageSM model);
|
||||
bool Create(VoyageBM model);
|
||||
bool Update(VoyageBM model);
|
||||
bool Delete(VoyageBM model);
|
||||
}
|
||||
}
|
13
Subd/Contracts/Contracts.csproj
Normal file
13
Subd/Contracts/Contracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Subd\DataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
15
Subd/Contracts/SearchModel/CarSM.cs
Normal file
15
Subd/Contracts/SearchModel/CarSM.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class CarSM
|
||||
{
|
||||
public string? Model { get; set; }
|
||||
public int? Id { get; set; }
|
||||
public int? StatusId { get; set; }
|
||||
}
|
||||
}
|
15
Subd/Contracts/SearchModel/CompanySM.cs
Normal file
15
Subd/Contracts/SearchModel/CompanySM.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class CompanySM
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public int? Id { get; set; }
|
||||
public int? StatusId { get; set; }
|
||||
}
|
||||
}
|
15
Subd/Contracts/SearchModel/HumanSM.cs
Normal file
15
Subd/Contracts/SearchModel/HumanSM.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class HumanSM
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public int? Id { get; set; }
|
||||
public int? StatusId { get; set; }
|
||||
}
|
||||
}
|
15
Subd/Contracts/SearchModel/PlaceSM.cs
Normal file
15
Subd/Contracts/SearchModel/PlaceSM.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class PlaceSM
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
public int? Id { get; set; }
|
||||
|
||||
}
|
||||
}
|
14
Subd/Contracts/SearchModel/RouteSM.cs
Normal file
14
Subd/Contracts/SearchModel/RouteSM.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class RouteSM
|
||||
{
|
||||
public int? Length { get; set; }
|
||||
public int? Id { get; set; }
|
||||
}
|
||||
}
|
13
Subd/Contracts/SearchModel/StatusSM.cs
Normal file
13
Subd/Contracts/SearchModel/StatusSM.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class StatusSM
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
}
|
||||
}
|
16
Subd/Contracts/SearchModel/VoyageSM.cs
Normal file
16
Subd/Contracts/SearchModel/VoyageSM.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class VoyageSM
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public DateTime? DateStart { get; set; }
|
||||
public DateTime? DateEnd { get; set; }
|
||||
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/ICarStorage.cs
Normal file
21
Subd/Contracts/Storage/ICarStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface ICarStorage
|
||||
{
|
||||
List<CarVM> GetFullList();
|
||||
List<CarVM> GetFilteredList(CarSM model);
|
||||
CarVM? GetElement(CarSM model);
|
||||
CarVM? Insert(CarBM model);
|
||||
CarVM? Update(CarBM model);
|
||||
CarVM? Delete(CarBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/ICompanyStorage.cs
Normal file
21
Subd/Contracts/Storage/ICompanyStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface ICompanyStorage
|
||||
{
|
||||
List<CompanyVM> GetFullList();
|
||||
List<CompanyVM> GetFilteredList(CompanySM model);
|
||||
CompanyVM? GetElement(CompanySM model);
|
||||
CompanyVM? Insert(CompanyBM model);
|
||||
CompanyVM? Update(CompanyBM model);
|
||||
CompanyVM? Delete(CompanyBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/IHumanStorage.cs
Normal file
21
Subd/Contracts/Storage/IHumanStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface IHumanStorage
|
||||
{
|
||||
List<HumanVM> GetFullList();
|
||||
List<HumanVM> GetFilteredList(HumanSM model);
|
||||
HumanVM? GetElement(HumanSM model);
|
||||
HumanVM? Insert(HumanBM model);
|
||||
HumanVM? Update(HumanBM model);
|
||||
HumanVM? Delete(HumanBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/IPlaceStorage.cs
Normal file
21
Subd/Contracts/Storage/IPlaceStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface IPlaceStorage
|
||||
{
|
||||
List<PlaceVM> GetFullList();
|
||||
List<PlaceVM> GetFilteredList(PlaceSM model);
|
||||
PlaceVM? GetElement(PlaceSM model);
|
||||
PlaceVM? Insert(PlaceBM model);
|
||||
PlaceVM? Update(PlaceBM model);
|
||||
PlaceVM? Delete(PlaceBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/IRouteStorage.cs
Normal file
21
Subd/Contracts/Storage/IRouteStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface IRouteStorage
|
||||
{
|
||||
List<RouteVM> GetFullList();
|
||||
List<RouteVM> GetFilteredList(RouteSM model);
|
||||
RouteVM? GetElement(RouteSM model);
|
||||
RouteVM? Insert(RouteBM model);
|
||||
RouteVM? Update(RouteBM model);
|
||||
RouteVM? Delete(RouteBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/IStatusStorage.cs
Normal file
21
Subd/Contracts/Storage/IStatusStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface IStatusStorage
|
||||
{
|
||||
List<StatusVM> GetFullList();
|
||||
List<StatusVM> GetFilteredList(StatusSM model);
|
||||
StatusVM? GetElement(StatusSM model);
|
||||
StatusVM? Insert(StatusBM model);
|
||||
StatusVM? Update(StatusBM model);
|
||||
StatusVM? Delete(StatusBM model);
|
||||
}
|
||||
}
|
21
Subd/Contracts/Storage/IVoyageStorage.cs
Normal file
21
Subd/Contracts/Storage/IVoyageStorage.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Contracts.BindingModels;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.Storage
|
||||
{
|
||||
public interface IVoyageStorage
|
||||
{
|
||||
List<VoyageVM> GetFullList();
|
||||
List<VoyageVM> GetFilteredList(VoyageSM model);
|
||||
VoyageVM? GetElement(VoyageSM model);
|
||||
VoyageVM? Insert(VoyageBM model);
|
||||
VoyageVM? Update(VoyageBM model);
|
||||
VoyageVM? Delete(VoyageBM model);
|
||||
}
|
||||
}
|
24
Subd/Contracts/ViewModels/CarVM.cs
Normal file
24
Subd/Contracts/ViewModels/CarVM.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class CarVM : ICar
|
||||
{
|
||||
[DisplayName("Модель")]
|
||||
public string Model { get; set; } = string.Empty;
|
||||
[DisplayName("Грузоподъемность")]
|
||||
public int Tonnage { get; set; }
|
||||
|
||||
public int StatusId { get; set; }
|
||||
[DisplayName("Статус")]
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
22
Subd/Contracts/ViewModels/CompanyVM.cs
Normal file
22
Subd/Contracts/ViewModels/CompanyVM.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class CompanyVM : ICompany
|
||||
{
|
||||
[DisplayName("Название")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int StatusId { get; set; }
|
||||
[DisplayName("Статус")]
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
24
Subd/Contracts/ViewModels/HumanVM.cs
Normal file
24
Subd/Contracts/ViewModels/HumanVM.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class HumanVM : IHuman
|
||||
{
|
||||
[DisplayName("ФИО")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[DisplayName("Телефон")]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
|
||||
public int StatusId { get; set; }
|
||||
[DisplayName("Статус")]
|
||||
public string StatusTitle { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
18
Subd/Contracts/ViewModels/PlaceVM.cs
Normal file
18
Subd/Contracts/ViewModels/PlaceVM.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class PlaceVM : IPlace
|
||||
{
|
||||
[DisplayName("Название")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
23
Subd/Contracts/ViewModels/RouteVM.cs
Normal file
23
Subd/Contracts/ViewModels/RouteVM.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class RouteVM : IRoute
|
||||
{
|
||||
public int PlaceStart { get; set; }
|
||||
|
||||
public int PlaceEnd { get; set; }
|
||||
|
||||
public int Length { get; set; }
|
||||
[DisplayName("Название")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
18
Subd/Contracts/ViewModels/StatusVM.cs
Normal file
18
Subd/Contracts/ViewModels/StatusVM.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class StatusVM : IStatus
|
||||
{
|
||||
[DisplayName("Название")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
33
Subd/Contracts/ViewModels/VoyageVM.cs
Normal file
33
Subd/Contracts/ViewModels/VoyageVM.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModels
|
||||
{
|
||||
public class VoyageVM : IVoyage
|
||||
{
|
||||
public int CarId { get; set; }
|
||||
[DisplayName("Машина")]
|
||||
public string CarName { get; set; } = string.Empty;
|
||||
|
||||
public int HumanId { get; set; }
|
||||
[DisplayName("Водитель")]
|
||||
public string HumanName { get; set; } = string.Empty;
|
||||
|
||||
public int CompanyId { get; set; }
|
||||
[DisplayName("Заказчик")]
|
||||
public string CompanyName { get; set; } = string.Empty;
|
||||
|
||||
public int RouteId { get; set; }
|
||||
[DisplayName("Дата выезда")]
|
||||
public DateTime DateStart { get; set; }
|
||||
[DisplayName("Срок")]
|
||||
public DateTime DateEnd { get; set; }
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32825.248
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataModels", "Subd\DataModels.csproj", "{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contracts", "Contracts\Contracts.csproj", "{AB284C76-C880-4A90-8E6D-00A8ACCA531A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -15,6 +17,10 @@ Global
|
||||
{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB284C76-C880-4A90-8E6D-00A8ACCA531A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB284C76-C880-4A90-8E6D-00A8ACCA531A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB284C76-C880-4A90-8E6D-00A8ACCA531A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AB284C76-C880-4A90-8E6D-00A8ACCA531A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
Reference in New Issue
Block a user