- @Html.DisplayFor(modelItem =>
- item.DateDelivery)
+ @Html.DisplayFor(modelItem => item.DateDelivery)
|
- @Html.DisplayFor(modelItem =>
- item.Subject)
+ @Html.DisplayFor(modelItem => item.Subject)
|
- @Html.DisplayFor(modelItem =>
- item.Body)
+ @Html.DisplayFor(modelItem => item.Body)
|
}
diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/MessageInfoViewModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/MessageInfoViewModel.cs
index 26fe0ad..6e62d95 100644
--- a/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/MessageInfoViewModel.cs
+++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/ViewModels/MessageInfoViewModel.cs
@@ -1,6 +1,7 @@
using BlacksmithWorkshopDataModels.Models;
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -13,12 +14,17 @@ namespace BlacksmithWorkshopContracts.ViewModels
public int? ClientId { get; set; }
+ [DisplayName("Отправитель")]
public string SenderName { get; set; } = string.Empty;
+ [DisplayName("Дата отправки")]
public DateTime DateDelivery { get; set; } = DateTime.Now;
+
+ [DisplayName("Заголовок")]
public string Subject { get; set; } = string.Empty;
+ [DisplayName("Текст")]
public string Body { get; set; } = string.Empty;
}
}
diff --git a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/BlacksmithWorkshopDatabase.cs b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/BlacksmithWorkshopDatabase.cs
index 24ee424..f18692e 100644
--- a/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/BlacksmithWorkshopDatabase.cs
+++ b/BlacksmithWorkshop/BlacksmithWorkshopDatabaseImplement/BlacksmithWorkshopDatabase.cs
@@ -32,5 +32,7 @@ namespace BlacksmithWorkshopDatabaseImplement
public virtual DbSet