чиназес

This commit is contained in:
ChaZIR 2024-04-30 01:28:42 +04:00
parent a39601fb5d
commit ebae3c72a8
21 changed files with 395 additions and 12 deletions

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.BindingModels.Contractor
{
public class ContractorBindingModel : IContractorModel
{
public int Id { get; set; }
public string Surname { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Patronymic { get; set; } = string.Empty;
public string Login { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string MobilePhone { get; set; } = string.Empty;
}
}

View File

@ -1,11 +1,14 @@
using TravelCompanyDataModels.Models;
using System.ComponentModel;
using TravelCompanyDataModels.Models;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.BindingModels.Contractor
{
public class ExcursionBindingModel
public class ExcursionBindingModel : IExcursionModel
{
public int Id { get; set; }
public string ExcursionName { get; set; } = string.Empty;
public int ExcursionPrice { get; set; }
public int ContractorID { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.BindingModels.Contractor
{
public class ExcursionGroupBindingModel : IExcursionGroupModel
{
public int Id { get; set; }
public string ExcursionGroupName { get; set; } = string.Empty;
public int PeopleAmount { get; set; }
public int ContractorID { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.BindingModels.Contractor
{
public class TourBindingModel : ITourModel
{
public int Id { get; set; }
public string TourName { get; set; } = string.Empty;
public DateTime TourDate { get; set; }
public int ContractorID { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor;
namespace TravelCompanyContracts.BusinessLogicsContracts.Contractor
{
public interface IContractorLogic
{
List<ContractorViewModel>? ReadList(ContractorSearchModel? model);
ContractorViewModel? ReadElement(ContractorSearchModel model);
bool Create(ContractorBindingModel model);
bool Update(ContractorBindingModel model);
bool Delete(ContractorBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
namespace TravelCompanyContracts.BusinessLogicsContracts.Contractor
{
public interface IExcursionGroupLogic
{
List<ExcursionGroupViewModel>? ReadList(ExcursionGroupSearchModel? model);
ExcursionGroupViewModel? ReadElement(ExcursionGroupSearchModel model);
bool Create(ExcursionGroupBindingModel model);
bool Update(ExcursionGroupBindingModel model);
bool Delete(ExcursionGroupBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
namespace TravelCompanyContracts.BusinessLogicsContracts.Contractor
{
public interface IExcursionLogic
{
List<ExcursionViewModel>? ReadList(ExcursionSearchModel? model);
ExcursionViewModel? ReadElement(ExcursionSearchModel model);
bool Create(ExcursionBindingModel model);
bool Update(ExcursionBindingModel model);
bool Delete(ExcursionBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.BindingModels.Contractor;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
namespace TravelCompanyContracts.BusinessLogicsContracts.Contractor
{
public interface ITourLogic
{
List<TourViewModel>? ReadList(TourSearchModel? model);
TourViewModel? ReadElement(TourSearchModel model);
bool Create(TourBindingModel model);
bool Update(TourBindingModel model);
bool Delete(TourBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TravelCompanyContracts.SearchModels.Contractor
{
public class ContractorSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; } = string.Empty;
public string? Surname { get; set; } = string.Empty;
public string? Patronymic { get; set; } = string.Empty;
public string? Login { get; set; } = string.Empty;
public string? Password { get; set; } = string.Empty;
public string? Email { get; set; } = string.Empty;
public string? MobilePhone { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TravelCompanyContracts.SearchModels.Contractor
{
public class ExcursionGroupSearchModel
{
public int? Id { get; set; }
public string? ExcursionGroupName { get; set; } = string.Empty;
public int? PeopleAmount { get; set; }
public int? ContractorID { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TravelCompanyContracts.SearchModels.Contractor
{
public class ExcursionSearchModel
{
public int? Id { get; set; }
public string? ExcursionName { get; set; } = string.Empty;
public int? ExcursionPrice { get; set; }
public int? ContractorID { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TravelCompanyContracts.SearchModels.Contractor
{
public class TourSearchModel
{
public int? Id { get; set; }
public string? TourName { get; set; } = string.Empty;
public DateTime? TourDate { get; set; }
public int? ContractorID { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.BindingModels;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
namespace TravelCompanyContracts.StoragesModels.Contractor
{
public interface IContractorStorage
{
List<ContractorViewModel> GetFullList();
List<ContractorViewModel> GetFilteredList(ContractorSearchModel model);
ContractorViewModel? GetElement(ContractorSearchModel model);
ContractorViewModel? Insert(ContractorSearchModel model);
ContractorViewModel? Update(ContractorSearchModel model);
ContractorViewModel? Delete(ContractorSearchModel model);
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.BindingModels.Contractor;
namespace TravelCompanyContracts.StoragesModels.Contractor
{
public interface IExcursionGroupStorage
{
List<ExcursionGroupViewModel> GetFullList();
List<ExcursionGroupViewModel> GetFilteredList(ExcursionGroupSearchModel model);
ExcursionGroupViewModel? GetElement(ExcursionGroupSearchModel model);
ExcursionGroupViewModel? Insert(ExcursionGroupBindingModel model);
ExcursionGroupViewModel? Update(ExcursionGroupBindingModel model);
ExcursionGroupViewModel? Delete(ExcursionGroupBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.BindingModels.Contractor;
namespace TravelCompanyContracts.StoragesModels.Contractor
{
public interface IExcursionStorage
{
List<ExcursionViewModel> GetFullList();
List<ExcursionViewModel> GetFilteredList(ExcursionSearchModel model);
ExcursionViewModel? GetElement(ExcursionSearchModel model);
ExcursionViewModel? Insert(ExcursionBindingModel model);
ExcursionViewModel? Update(ExcursionBindingModel model);
ExcursionViewModel? Delete(ExcursionBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyContracts.SearchModels.Contractor;
using TravelCompanyContracts.ViewModels.Contractor.ViewModels;
using TravelCompanyContracts.BindingModels.Contractor;
namespace TravelCompanyContracts.StoragesModels.Contractor
{
public interface ITourStorage
{
List<TourViewModel> GetFullList();
List<TourViewModel> GetFilteredList(TourSearchModel model);
TourViewModel? GetElement(TourSearchModel model);
TourViewModel? Insert(TourBindingModel model);
TourViewModel? Update(TourBindingModel model);
TourViewModel? Delete(TourBindingModel model);
}
}

View File

@ -6,13 +6,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts\Contractor\" />
<Folder Include="SearchModels\Contractor\" />
<Folder Include="StoragesModels\Contractor\" />
<Folder Include="ViewModels\Contractor\ViewModels\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TravelCompanyDataModels\TravelCompanyDataModels.csproj" />
</ItemGroup>

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
{
public class ContractorViewModel : IContractorModel
{
public int Id { get; set; }
[DisplayName("Фамилия")]
public string Surname { get; set; } = string.Empty;
[DisplayName("Имя")]
public string Name { get; set; } = string.Empty;
[DisplayName("Отчество")]
public string Patronymic { get; set; } = string.Empty;
[DisplayName("Логин")]
public string Login { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Почта")]
public string Email { get; set; } = string.Empty;
[DisplayName("Телефон")]
public string MobilePhone { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
{
public class ExcursionGroupViewModel : IExcursionGroupModel
{
public int Id { get; set; }
[DisplayName("Наименование экскурсионной группы")]
public string ExcursionGroupName { get; set; } = string.Empty;
[DisplayName("Количество людей")]
public int PeopleAmount { get; set; }
public int ContractorID { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
{
public class ExcursionViewModel : IExcursionModel
{
public int Id { get; set; }
[DisplayName("Наименование экскурсии")]
public string ExcursionName { get; set; } = string.Empty;
[DisplayName("Стоимость экскурсии")]
public int ExcursionPrice { get; set; }
public int ContractorID { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TravelCompanyDataModels.Models.Contractor;
namespace TravelCompanyContracts.ViewModels.Contractor.ViewModels
{
public class TourViewModel : ITourModel
{
public int Id { get; set; }
[DisplayName("Наименование тура")]
public string TourName { get; set; } = string.Empty;
[DisplayName("Дата тура")]
public DateTime TourDate { get; set; }
public int ContractorID { get; set; }
}
}