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