Исправил ошибки
This commit is contained in:
parent
968d175443
commit
4e38974bde
@ -126,6 +126,7 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
Id = element.Id,
|
Id = element.Id,
|
||||||
ConferenceName = element.ConferenceName,
|
ConferenceName = element.ConferenceName,
|
||||||
Subject = element.Subject,
|
Subject = element.Subject,
|
||||||
|
StartDate = element.StartDate,
|
||||||
OrganiserId = element.OrganiserId,
|
OrganiserId = element.OrganiserId,
|
||||||
ConferenceParticipants = element.ConferenceParticipants,
|
ConferenceParticipants = element.ConferenceParticipants,
|
||||||
});
|
});
|
||||||
@ -144,7 +145,7 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
if (string.IsNullOrEmpty(model.ConferenceName))
|
if (string.IsNullOrEmpty(model.ConferenceName))
|
||||||
throw new ArgumentException("Нет названия конференции", nameof(model.ConferenceName));
|
throw new ArgumentException("Нет названия конференции", nameof(model.ConferenceName));
|
||||||
|
|
||||||
_logger.LogInformation("Conference. ConferenceName:{ConferenceName}. Id: { Id}", model.ConferenceName, model.Id);
|
_logger.LogInformation("Conference. ConferenceName:{ConferenceName}.StartDate:{ StartDate}.Id: { Id}", model.ConferenceName, model.StartDate, model.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
Id = element.Id,
|
Id = element.Id,
|
||||||
RoomNumber = element.RoomNumber,
|
RoomNumber = element.RoomNumber,
|
||||||
RoomPrice = element.RoomPrice,
|
RoomPrice = element.RoomPrice,
|
||||||
CountBeds = element.CountBeds,
|
DateCreate = element.DateCreate,
|
||||||
MealPlanId = element.MealPlanId,
|
MealPlanId = element.MealPlanId,
|
||||||
AdministratorId = element.AdministratorId,
|
AdministratorId = element.AdministratorId,
|
||||||
RoomDinners = element.RoomDinners,
|
RoomDinners = element.RoomDinners,
|
||||||
@ -148,16 +148,12 @@ namespace HotelBusinessLogic.BusinessLogic
|
|||||||
{
|
{
|
||||||
throw new ArgumentNullException("Номер комнаты не может быть меньше 0", nameof(model.RoomNumber));
|
throw new ArgumentNullException("Номер комнаты не может быть меньше 0", nameof(model.RoomNumber));
|
||||||
}
|
}
|
||||||
if (model.CountBeds < 0)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("Количество спальных мест не может быть меньше 0", nameof(model.CountBeds));
|
|
||||||
}
|
|
||||||
if (model.RoomPrice < 0)
|
if (model.RoomPrice < 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("Цена комнаты не может быть меньше 0", nameof(model.RoomPrice));
|
throw new ArgumentNullException("Цена комнаты не может быть меньше 0", nameof(model.RoomPrice));
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("Room. RoomNumber:{RoomNumber}.CountBeds:{CountBeds}.RoomPrice:{RoomPrice}. Id: {Id}", model.RoomNumber, model.CountBeds, model.RoomPrice, model.Id);
|
_logger.LogInformation("Room. RoomNumber:{RoomNumber}.RoomPrice:{RoomPrice}. Id: {Id}", model.RoomNumber, model.RoomPrice, model.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace HotelContracts.BindingModels
|
|||||||
|
|
||||||
public string Subject { get; set; } = string.Empty;
|
public string Subject { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime StartDate { get; set; } = DateTime.Now;
|
||||||
public int OrganiserId { get; set; }
|
public int OrganiserId { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; set; } = new();
|
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; set; } = new();
|
||||||
|
@ -11,7 +11,7 @@ namespace HotelContracts.BindingModels
|
|||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public int RoomNumber { get; set; }
|
public int RoomNumber { get; set; }
|
||||||
public int CountBeds { get; set; }
|
public DateTime? DateCreate { get; set; }
|
||||||
public double RoomPrice { get; set; }
|
public double RoomPrice { get; set; }
|
||||||
public int AdministratorId { get; set; }
|
public int AdministratorId { get; set; }
|
||||||
public int? MealPlanId { get; set; }
|
public int? MealPlanId { get; set; }
|
||||||
|
@ -13,7 +13,5 @@ namespace HotelContracts.SearchModels
|
|||||||
public int? ConferenceId { get; set; }
|
public int? ConferenceId { get; set; }
|
||||||
public string? PlaceСonference { get; set; }
|
public string? PlaceСonference { get; set; }
|
||||||
public DateTime? DateСonference { get; set; }
|
public DateTime? DateСonference { get; set; }
|
||||||
public DateTime? DateFrom { get; set; }
|
|
||||||
public DateTime? DateTo { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@ namespace HotelContracts.SearchModels
|
|||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
|
|
||||||
public string? ConferenceName { get; set; }
|
public string? ConferenceName { get; set; }
|
||||||
|
|
||||||
public int? OrganiserId { get; set; }
|
public int? OrganiserId { get; set; }
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,8 @@ namespace HotelContracts.SearchModels
|
|||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
public int? RoomNumber { get; set; }
|
public int? RoomNumber { get; set; }
|
||||||
public int? AdministratorId { get; set; }
|
public int? AdministratorId { get; set; }
|
||||||
|
public DateTime? DateCreate { get; set; }
|
||||||
|
public DateTime? DateFrom { get; set; }
|
||||||
|
public DateTime? DateTo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,9 @@ namespace HotelContracts.ViewModels
|
|||||||
public string Subject { get; set; } = string.Empty;
|
public string Subject { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int OrganiserId { get; set; }
|
public int OrganiserId { get; set; }
|
||||||
|
[DisplayName("Дата начала конференции")]
|
||||||
|
public DateTime StartDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; set; } = new();
|
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; set; } = new();
|
||||||
//public Dictionary<int, IConferenceBookingModel> ConferenceConferenceBooking { get; set; } = new();
|
//public Dictionary<int, IConferenceBookingModel> ConferenceConferenceBooking { get; set; } = new();
|
||||||
|
@ -13,8 +13,8 @@ namespace HotelContracts.ViewModels
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
[DisplayName("Номер комнаты")]
|
[DisplayName("Номер комнаты")]
|
||||||
public int RoomNumber { get; set; }
|
public int RoomNumber { get; set; }
|
||||||
[DisplayName("Количество спальных мест")]
|
[DisplayName("Дата создания номера")]
|
||||||
public int CountBeds { get; set; }
|
public DateTime? DateCreate { get; set; }
|
||||||
[DisplayName("Стоимость номера")]
|
[DisplayName("Стоимость номера")]
|
||||||
public double RoomPrice { get; set; }
|
public double RoomPrice { get; set; }
|
||||||
public int AdministratorId { get; set; }
|
public int AdministratorId { get; set; }
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
{
|
{
|
||||||
string ConferenceName { get; }
|
string ConferenceName { get; }
|
||||||
string Subject { get; }
|
string Subject { get; }
|
||||||
|
DateTime StartDate { get; }
|
||||||
int OrganiserId { get; }
|
int OrganiserId { get; }
|
||||||
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; }
|
public Dictionary<int, IParticipantModel> ConferenceParticipants { get; }
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ namespace HotelDataModels.Models
|
|||||||
public interface IRoomModel : IId
|
public interface IRoomModel : IId
|
||||||
{
|
{
|
||||||
int RoomNumber { get; }
|
int RoomNumber { get; }
|
||||||
int CountBeds { get; }
|
|
||||||
double RoomPrice { get; }
|
double RoomPrice { get; }
|
||||||
|
DateTime? DateCreate { get; }
|
||||||
int AdministratorId { get; }
|
int AdministratorId { get; }
|
||||||
public Dictionary<int, IDinnerModel> RoomDinners { get; }
|
public Dictionary<int, IDinnerModel> RoomDinners { get; }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user