Merge branch 'first_branch' of https://git.is.ulstu.ru/Extrimal/PIbd-21_Kurs_Work_Hotel into first_branch
This commit is contained in:
commit
777f14f7c9
@ -0,0 +1,19 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BindingModels
|
||||
{
|
||||
public class AdministratorBindingModel : IAdministratorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string AdministratorFIO { get; set; } = string.Empty;
|
||||
public string AdministratorPhone { get; set; } = string.Empty;
|
||||
public string AdministratorLogin { get; set; } = string.Empty;
|
||||
public string AdministratorPassword { get; set; } = string.Empty;
|
||||
public string AdministratorEmail { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BindingModels
|
||||
{
|
||||
public class ConferenceBookingBindingModel : IConferenceBookingModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
public int? ConferenceId { get; set; }
|
||||
public string PlaceСonference { get; set; } = string.Empty;
|
||||
public DateTime? DateСonference { get; set; }
|
||||
public Dictionary<int, IDinnerModel> ConferenceBookingDinners { get; set; } = new();
|
||||
}
|
||||
}
|
18
Hotel/HotelContracts/BindingModels/DinnerBindingModel.cs
Normal file
18
Hotel/HotelContracts/BindingModels/DinnerBindingModel.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BindingModels
|
||||
{
|
||||
public class DinnerBindingModel : IDinnerModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string DinnerName { get; set; } = string.Empty;
|
||||
public int DinnerСalorieСontent { get; set; }
|
||||
public double DinnerPrice { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
}
|
||||
}
|
20
Hotel/HotelContracts/BindingModels/RoomBindingModel.cs
Normal file
20
Hotel/HotelContracts/BindingModels/RoomBindingModel.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BindingModels
|
||||
{
|
||||
public class RoomBindingModel : IRoomModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int RoomNumber { get; set; }
|
||||
public int CountBeds { get; set; }
|
||||
public double RoomPrice { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
public Dictionary<int, IDinnerModel> RoomDinners { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IAdministratorLogic
|
||||
{
|
||||
List<AdministratorViewModel>? ReadList(AdministratorSearchModel? model);
|
||||
AdministratorViewModel? ReadElement(AdministratorSearchModel model);
|
||||
bool Create(AdministratorBindingModel model);
|
||||
bool Update(AdministratorBindingModel model);
|
||||
bool Delete(AdministratorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IConferenceBookingLogic
|
||||
{
|
||||
List<ConferenceBookingViewModel>? ReadList(ConferenceBookingSearchModel? model);
|
||||
ConferenceBookingViewModel? ReadElement(ConferenceBookingSearchModel model);
|
||||
bool Create(ConferenceBookingBindingModel model);
|
||||
bool Update(ConferenceBookingBindingModel model);
|
||||
bool Delete(ConferenceBookingBindingModel model);
|
||||
}
|
||||
}
|
20
Hotel/HotelContracts/BusinessLogicsContracts/IDinnerLogic.cs
Normal file
20
Hotel/HotelContracts/BusinessLogicsContracts/IDinnerLogic.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IDinnerLogic
|
||||
{
|
||||
List<DinnerViewModel>? ReadList(DinnerSearchModel? model);
|
||||
DinnerViewModel? ReadElement(DinnerSearchModel model);
|
||||
bool Create(DinnerBindingModel model);
|
||||
bool Update(DinnerBindingModel model);
|
||||
bool Delete(DinnerBindingModel model);
|
||||
}
|
||||
}
|
21
Hotel/HotelContracts/BusinessLogicsContracts/IRoomLogic.cs
Normal file
21
Hotel/HotelContracts/BusinessLogicsContracts/IRoomLogic.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IRoomLogic
|
||||
{
|
||||
List<RoomViewModel>? ReadList(RoomSearchModel? model);
|
||||
RoomViewModel? ReadElement(RoomSearchModel model);
|
||||
bool Create(RoomBindingModel model);
|
||||
bool Update(RoomBindingModel model);
|
||||
bool Delete(RoomBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.SearchModels
|
||||
{
|
||||
public class AdministratorSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? AdministratorFIO { get; set; }
|
||||
public string? AdministratorLogin { get; set; }
|
||||
|
||||
public string? AdministratorPassword { get; set; }
|
||||
public string? AdministratorEmail { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.SearchModels
|
||||
{
|
||||
public class ConferenceBookingSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public int? AdministratorId { get; set; }
|
||||
public int? ConferenceId { get; set; }
|
||||
public string? PlaceСonference { get; set; }
|
||||
public DateTime? DateСonference { get; set; }
|
||||
}
|
||||
}
|
15
Hotel/HotelContracts/SearchModels/DinnerSearchModel.cs
Normal file
15
Hotel/HotelContracts/SearchModels/DinnerSearchModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.SearchModels
|
||||
{
|
||||
public class DinnerSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? DinnerName { get; set; }
|
||||
public int? AdministratorId { get; set; }
|
||||
}
|
||||
}
|
15
Hotel/HotelContracts/SearchModels/RoomSearchModel.cs
Normal file
15
Hotel/HotelContracts/SearchModels/RoomSearchModel.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.SearchModels
|
||||
{
|
||||
public class RoomSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public int? RoomNumber { get; set; }
|
||||
public int? AdministratorId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.StoragesContracts
|
||||
{
|
||||
public interface IAdministratorStorage
|
||||
{
|
||||
List<AdministratorViewModel> GetFullList();
|
||||
|
||||
List<AdministratorViewModel> GetFilteredList(AdministratorSearchModel model);
|
||||
|
||||
AdministratorViewModel? GetElement(AdministratorSearchModel model);
|
||||
|
||||
AdministratorViewModel? Insert(AdministratorBindingModel model);
|
||||
|
||||
AdministratorViewModel? Update(AdministratorBindingModel model);
|
||||
|
||||
AdministratorViewModel? Delete(AdministratorBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.StoragesContracts
|
||||
{
|
||||
public interface IConferenceBookingStorage
|
||||
{
|
||||
List<ConferenceBookingViewModel> GetFullList();
|
||||
|
||||
List<ConferenceBookingViewModel> GetFilteredList(ConferenceBookingSearchModel model);
|
||||
|
||||
ConferenceBookingViewModel? GetElement(ConferenceBookingSearchModel model);
|
||||
|
||||
ConferenceBookingViewModel? Insert(ConferenceBookingBindingModel model);
|
||||
|
||||
ConferenceBookingViewModel? Update(ConferenceBookingBindingModel model);
|
||||
|
||||
ConferenceBookingViewModel? Delete(ConferenceBookingBindingModel model);
|
||||
}
|
||||
}
|
26
Hotel/HotelContracts/StoragesContracts/IDinnerStorage.cs
Normal file
26
Hotel/HotelContracts/StoragesContracts/IDinnerStorage.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.StoragesContracts
|
||||
{
|
||||
public interface IDinnerStorage
|
||||
{
|
||||
List<DinnerViewModel> GetFullList();
|
||||
|
||||
List<DinnerViewModel> GetFilteredList(DinnerSearchModel model);
|
||||
|
||||
DinnerViewModel? GetElement(DinnerSearchModel model);
|
||||
|
||||
DinnerViewModel? Insert(DinnerBindingModel model);
|
||||
|
||||
DinnerViewModel? Update(DinnerBindingModel model);
|
||||
|
||||
DinnerViewModel? Delete(DinnerBindingModel model);
|
||||
}
|
||||
}
|
26
Hotel/HotelContracts/StoragesContracts/IRoomStorage.cs
Normal file
26
Hotel/HotelContracts/StoragesContracts/IRoomStorage.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using HotelContracts.BindingModels;
|
||||
using HotelContracts.SearchModels;
|
||||
using HotelContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.StoragesContracts
|
||||
{
|
||||
public interface IRoomStorage
|
||||
{
|
||||
List<RoomViewModel> GetFullList();
|
||||
|
||||
List<RoomViewModel> GetFilteredList(RoomSearchModel model);
|
||||
|
||||
RoomViewModel? GetElement(RoomSearchModel model);
|
||||
|
||||
RoomViewModel? Insert(RoomBindingModel model);
|
||||
|
||||
RoomViewModel? Update(RoomBindingModel model);
|
||||
|
||||
RoomViewModel? Delete(RoomBindingModel model);
|
||||
}
|
||||
}
|
30
Hotel/HotelContracts/ViewModels/AdministratorViewModel.cs
Normal file
30
Hotel/HotelContracts/ViewModels/AdministratorViewModel.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.ViewModels
|
||||
{
|
||||
public class AdministratorViewModel : IAdministratorModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("ФИО администратора")]
|
||||
public string AdministratorFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Пароль администратора")]
|
||||
public string AdministratorPassword { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Логин администратора")]
|
||||
public string AdministratorLogin { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Mail администратора")]
|
||||
public string AdministratorEmail { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Телефон администратора")]
|
||||
public string AdministratorPhone { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.ViewModels
|
||||
{
|
||||
public class ConferenceBookingViewModel : IConferenceBookingModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
public int? ConferenceId { get; set; }
|
||||
public string PlaceСonference { get; set; } = string.Empty;
|
||||
[DisplayName("Дата конференции")]
|
||||
public DateTime? DateСonference { get; set; }
|
||||
public Dictionary<int, IDinnerModel> ConferenceBookingDinners { get; set; } = new();
|
||||
}
|
||||
}
|
22
Hotel/HotelContracts/ViewModels/DinnerViewModel.cs
Normal file
22
Hotel/HotelContracts/ViewModels/DinnerViewModel.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.ViewModels
|
||||
{
|
||||
public class DinnerViewModel : IDinnerModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название обеда")]
|
||||
public string DinnerName { get; set; } = string.Empty;
|
||||
[DisplayName("Калорийность обеда")]
|
||||
public int DinnerСalorieСontent { get; set; }
|
||||
[DisplayName("Цена обеда")]
|
||||
public double DinnerPrice { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
}
|
||||
}
|
23
Hotel/HotelContracts/ViewModels/RoomViewModel.cs
Normal file
23
Hotel/HotelContracts/ViewModels/RoomViewModel.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using HotelDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HotelContracts.ViewModels
|
||||
{
|
||||
public class RoomViewModel : IRoomModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Номер комнаты")]
|
||||
public int RoomNumber { get; set; }
|
||||
[DisplayName("Количество спальных мест")]
|
||||
public int CountBeds { get; set; }
|
||||
[DisplayName("Стоимость номера")]
|
||||
public double RoomPrice { get; set; }
|
||||
public int AdministratorId { get; set; }
|
||||
public Dictionary<int, IDinnerModel> RoomDinners { get; set; } = new();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user