Отображение имени конференции

This commit is contained in:
AnnZhimol 2023-05-18 15:47:23 +04:00
parent c64501d59a
commit cdbf09470c
4 changed files with 14 additions and 8 deletions

View File

@ -43,11 +43,17 @@
>
@Html.DisplayFor(modelItem => item.NameHall)
</td>
<td
class="u-border-1 u-border-grey-40 u-border-no-left u-border-no-right u-table-cell"
>
@Html.DisplayFor(modelItem => item.ConferenceId)
@if (item.ConferenceId == null)
{
<td class="u-border-1 u-border-grey-40 u-border-no-left u-border-no-right u-table-cell">
Зал свободен
</td>
} else{
<td class="u-border-1 u-border-grey-40 u-border-no-left u-border-no-right u-table-cell">
@Html.DisplayFor(modelItem => item.ConfName)
</td>
}
</tr>
}
</tbody>

View File

@ -14,7 +14,7 @@ namespace HotelContracts.ViewModels
public int? ConferenceId { get; set; }
//конференс наме
public string ConfName { get; set; } = string.Empty;
public int Id { get; set; }
public string NameHall { get; set; } = string.Empty;

View File

@ -9,7 +9,7 @@ namespace HotelDataBaseImplement
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V0ON61E\SQLEXPRESS;Initial Catalog=HotelDataBaseFu;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-VG5USAH\SQLEXPRESS;Initial Catalog=HotelDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}

View File

@ -68,8 +68,8 @@ namespace HotelDataBaseImplement.Models
ConferenceId = ConferenceId,
HeadwaiterId = HeadwaiterId,
NameHall = NameHall,
ConferenceBookingDinners = ConferenceBookingDinners
//новое название = conference?.ConferenceName
ConferenceBookingDinners = ConferenceBookingDinners,
ConfName = Conference?.ConferenceName
};
public void UpdateDinners(HotelDataBase context, ConferenceBookingBindingModel model)