diff --git a/Subd/Contracts/BindingModels/CarBM.cs b/Subd/Contracts/BindingModels/CarBM.cs new file mode 100644 index 0000000..04a3a39 --- /dev/null +++ b/Subd/Contracts/BindingModels/CarBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BindingModels/CompanyBM.cs b/Subd/Contracts/BindingModels/CompanyBM.cs new file mode 100644 index 0000000..74439e4 --- /dev/null +++ b/Subd/Contracts/BindingModels/CompanyBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BindingModels/HumanBM.cs b/Subd/Contracts/BindingModels/HumanBM.cs new file mode 100644 index 0000000..fee6037 --- /dev/null +++ b/Subd/Contracts/BindingModels/HumanBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BindingModels/PlaceBM.cs b/Subd/Contracts/BindingModels/PlaceBM.cs new file mode 100644 index 0000000..2af18de --- /dev/null +++ b/Subd/Contracts/BindingModels/PlaceBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BindingModels/RouteBM.cs b/Subd/Contracts/BindingModels/RouteBM.cs new file mode 100644 index 0000000..ce44228 --- /dev/null +++ b/Subd/Contracts/BindingModels/RouteBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BindingModels/StatusBM.cs b/Subd/Contracts/BindingModels/StatusBM.cs new file mode 100644 index 0000000..ea18f31 --- /dev/null +++ b/Subd/Contracts/BindingModels/StatusBM.cs @@ -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;} + } +} diff --git a/Subd/Contracts/BindingModels/VoyageBM.cs b/Subd/Contracts/BindingModels/VoyageBM.cs new file mode 100644 index 0000000..19e71f8 --- /dev/null +++ b/Subd/Contracts/BindingModels/VoyageBM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/BusinessLogic/ICarLogic.cs b/Subd/Contracts/BusinessLogic/ICarLogic.cs new file mode 100644 index 0000000..cde2fc2 --- /dev/null +++ b/Subd/Contracts/BusinessLogic/ICarLogic.cs @@ -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? ReadList(CarSM model); + CarVM? ReadElement(CarSM model); + bool Create(CarBM model); + bool Update(CarBM model); + bool Delete(CarBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/ICompanyLogic.cs b/Subd/Contracts/BusinessLogic/ICompanyLogic.cs new file mode 100644 index 0000000..2d51f71 --- /dev/null +++ b/Subd/Contracts/BusinessLogic/ICompanyLogic.cs @@ -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? ReadList(CompanySM model); + CompanyVM? ReadElement(CompanySM model); + bool Create(CompanyBM model); + bool Update(CompanyBM model); + bool Delete(CompanyBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/IHumanLogic.cs b/Subd/Contracts/BusinessLogic/IHumanLogic.cs new file mode 100644 index 0000000..6c3714f --- /dev/null +++ b/Subd/Contracts/BusinessLogic/IHumanLogic.cs @@ -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? ReadList(HumanSM model); + HumanVM? ReadElement(HumanSM model); + bool Create(HumanBM model); + bool Update(HumanBM model); + bool Delete(HumanBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/IPlaceLogic.cs b/Subd/Contracts/BusinessLogic/IPlaceLogic.cs new file mode 100644 index 0000000..58214d2 --- /dev/null +++ b/Subd/Contracts/BusinessLogic/IPlaceLogic.cs @@ -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? ReadList(PlaceSM model); + PlaceVM? ReadElement(PlaceSM model); + bool Create(PlaceBM model); + bool Update(PlaceBM model); + bool Delete(PlaceBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/IRouteLogic.cs b/Subd/Contracts/BusinessLogic/IRouteLogic.cs new file mode 100644 index 0000000..c0f0ffc --- /dev/null +++ b/Subd/Contracts/BusinessLogic/IRouteLogic.cs @@ -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? ReadList(RouteSM model); + RouteVM? ReadElement(RouteSM model); + bool Create(RouteBM model); + bool Update(RouteBM model); + bool Delete(RouteBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/IStatusLogic.cs b/Subd/Contracts/BusinessLogic/IStatusLogic.cs new file mode 100644 index 0000000..28ade77 --- /dev/null +++ b/Subd/Contracts/BusinessLogic/IStatusLogic.cs @@ -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? ReadList(); + StatusVM? ReadElement(StatusSM model); + bool Create(StatusBM model); + bool Update(StatusBM model); + bool Delete(StatusBM model); + } +} diff --git a/Subd/Contracts/BusinessLogic/IVoyageLogic.cs b/Subd/Contracts/BusinessLogic/IVoyageLogic.cs new file mode 100644 index 0000000..8561059 --- /dev/null +++ b/Subd/Contracts/BusinessLogic/IVoyageLogic.cs @@ -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? ReadList(VoyageSM model); + VoyageVM? ReadElement(VoyageSM model); + bool Create(VoyageBM model); + bool Update(VoyageBM model); + bool Delete(VoyageBM model); + } +} diff --git a/Subd/Contracts/Contracts.csproj b/Subd/Contracts/Contracts.csproj new file mode 100644 index 0000000..8268933 --- /dev/null +++ b/Subd/Contracts/Contracts.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/Subd/Contracts/SearchModel/CarSM.cs b/Subd/Contracts/SearchModel/CarSM.cs new file mode 100644 index 0000000..b42068f --- /dev/null +++ b/Subd/Contracts/SearchModel/CarSM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/SearchModel/CompanySM.cs b/Subd/Contracts/SearchModel/CompanySM.cs new file mode 100644 index 0000000..24ac062 --- /dev/null +++ b/Subd/Contracts/SearchModel/CompanySM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/SearchModel/HumanSM.cs b/Subd/Contracts/SearchModel/HumanSM.cs new file mode 100644 index 0000000..abcd7ab --- /dev/null +++ b/Subd/Contracts/SearchModel/HumanSM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/SearchModel/PlaceSM.cs b/Subd/Contracts/SearchModel/PlaceSM.cs new file mode 100644 index 0000000..f0ff53a --- /dev/null +++ b/Subd/Contracts/SearchModel/PlaceSM.cs @@ -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; } + + } +} diff --git a/Subd/Contracts/SearchModel/RouteSM.cs b/Subd/Contracts/SearchModel/RouteSM.cs new file mode 100644 index 0000000..a299c6f --- /dev/null +++ b/Subd/Contracts/SearchModel/RouteSM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/SearchModel/StatusSM.cs b/Subd/Contracts/SearchModel/StatusSM.cs new file mode 100644 index 0000000..2a37c0a --- /dev/null +++ b/Subd/Contracts/SearchModel/StatusSM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/SearchModel/VoyageSM.cs b/Subd/Contracts/SearchModel/VoyageSM.cs new file mode 100644 index 0000000..dc11d1f --- /dev/null +++ b/Subd/Contracts/SearchModel/VoyageSM.cs @@ -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; } + + } +} diff --git a/Subd/Contracts/Storage/ICarStorage.cs b/Subd/Contracts/Storage/ICarStorage.cs new file mode 100644 index 0000000..eb16be1 --- /dev/null +++ b/Subd/Contracts/Storage/ICarStorage.cs @@ -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 GetFullList(); + List GetFilteredList(CarSM model); + CarVM? GetElement(CarSM model); + CarVM? Insert(CarBM model); + CarVM? Update(CarBM model); + CarVM? Delete(CarBM model); + } +} diff --git a/Subd/Contracts/Storage/ICompanyStorage.cs b/Subd/Contracts/Storage/ICompanyStorage.cs new file mode 100644 index 0000000..0977453 --- /dev/null +++ b/Subd/Contracts/Storage/ICompanyStorage.cs @@ -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 GetFullList(); + List GetFilteredList(CompanySM model); + CompanyVM? GetElement(CompanySM model); + CompanyVM? Insert(CompanyBM model); + CompanyVM? Update(CompanyBM model); + CompanyVM? Delete(CompanyBM model); + } +} diff --git a/Subd/Contracts/Storage/IHumanStorage.cs b/Subd/Contracts/Storage/IHumanStorage.cs new file mode 100644 index 0000000..1147f5b --- /dev/null +++ b/Subd/Contracts/Storage/IHumanStorage.cs @@ -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 GetFullList(); + List GetFilteredList(HumanSM model); + HumanVM? GetElement(HumanSM model); + HumanVM? Insert(HumanBM model); + HumanVM? Update(HumanBM model); + HumanVM? Delete(HumanBM model); + } +} diff --git a/Subd/Contracts/Storage/IPlaceStorage.cs b/Subd/Contracts/Storage/IPlaceStorage.cs new file mode 100644 index 0000000..3ccded8 --- /dev/null +++ b/Subd/Contracts/Storage/IPlaceStorage.cs @@ -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 GetFullList(); + List GetFilteredList(PlaceSM model); + PlaceVM? GetElement(PlaceSM model); + PlaceVM? Insert(PlaceBM model); + PlaceVM? Update(PlaceBM model); + PlaceVM? Delete(PlaceBM model); + } +} diff --git a/Subd/Contracts/Storage/IRouteStorage.cs b/Subd/Contracts/Storage/IRouteStorage.cs new file mode 100644 index 0000000..95f51a8 --- /dev/null +++ b/Subd/Contracts/Storage/IRouteStorage.cs @@ -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 GetFullList(); + List GetFilteredList(RouteSM model); + RouteVM? GetElement(RouteSM model); + RouteVM? Insert(RouteBM model); + RouteVM? Update(RouteBM model); + RouteVM? Delete(RouteBM model); + } +} diff --git a/Subd/Contracts/Storage/IStatusStorage.cs b/Subd/Contracts/Storage/IStatusStorage.cs new file mode 100644 index 0000000..db08fd4 --- /dev/null +++ b/Subd/Contracts/Storage/IStatusStorage.cs @@ -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 GetFullList(); + List GetFilteredList(StatusSM model); + StatusVM? GetElement(StatusSM model); + StatusVM? Insert(StatusBM model); + StatusVM? Update(StatusBM model); + StatusVM? Delete(StatusBM model); + } +} diff --git a/Subd/Contracts/Storage/IVoyageStorage.cs b/Subd/Contracts/Storage/IVoyageStorage.cs new file mode 100644 index 0000000..0515ef0 --- /dev/null +++ b/Subd/Contracts/Storage/IVoyageStorage.cs @@ -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 GetFullList(); + List GetFilteredList(VoyageSM model); + VoyageVM? GetElement(VoyageSM model); + VoyageVM? Insert(VoyageBM model); + VoyageVM? Update(VoyageBM model); + VoyageVM? Delete(VoyageBM model); + } +} diff --git a/Subd/Contracts/ViewModels/CarVM.cs b/Subd/Contracts/ViewModels/CarVM.cs new file mode 100644 index 0000000..2a7779c --- /dev/null +++ b/Subd/Contracts/ViewModels/CarVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/CompanyVM.cs b/Subd/Contracts/ViewModels/CompanyVM.cs new file mode 100644 index 0000000..40be48b --- /dev/null +++ b/Subd/Contracts/ViewModels/CompanyVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/HumanVM.cs b/Subd/Contracts/ViewModels/HumanVM.cs new file mode 100644 index 0000000..ec54517 --- /dev/null +++ b/Subd/Contracts/ViewModels/HumanVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/PlaceVM.cs b/Subd/Contracts/ViewModels/PlaceVM.cs new file mode 100644 index 0000000..1572481 --- /dev/null +++ b/Subd/Contracts/ViewModels/PlaceVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/RouteVM.cs b/Subd/Contracts/ViewModels/RouteVM.cs new file mode 100644 index 0000000..740f3ac --- /dev/null +++ b/Subd/Contracts/ViewModels/RouteVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/StatusVM.cs b/Subd/Contracts/ViewModels/StatusVM.cs new file mode 100644 index 0000000..08cfb46 --- /dev/null +++ b/Subd/Contracts/ViewModels/StatusVM.cs @@ -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; } + } +} diff --git a/Subd/Contracts/ViewModels/VoyageVM.cs b/Subd/Contracts/ViewModels/VoyageVM.cs new file mode 100644 index 0000000..1187781 --- /dev/null +++ b/Subd/Contracts/ViewModels/VoyageVM.cs @@ -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; } + } +} diff --git a/Subd/Subd.sln b/Subd/Subd.sln index 51d22df..2e4e6a3 100644 --- a/Subd/Subd.sln +++ b/Subd/Subd.sln @@ -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