Agliullov D. A. Lab Work 7 Hard #20
@ -22,7 +22,7 @@ namespace ConfectioneryView
|
||||
private readonly IMessageInfoLogic _logic;
|
||||
private MessageInfoViewModel _message;
|
||||
|
||||
public string MessageId { get; set; }
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
||||
public FormReplyMail(ILogger<FormReplyMail> logger, AbstractMailWorker mailWorker, IMessageInfoLogic logic)
|
||||
{
|
||||
@ -67,7 +67,10 @@ namespace ConfectioneryView
|
||||
Text += $"для {_message.SenderName}";
|
||||
textBoxHead.Text = _message.Subject;
|
||||
textBoxMail.Text = _message.Body;
|
||||
_logic.Update(new() { MessageId = MessageId, HasRead = true });
|
||||
if (_message.HasRead is false)
|
||||
{
|
||||
_logic.Update(new() { MessageId = MessageId, HasRead = true, Reply = _message.Reply });
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -104,10 +104,7 @@ namespace ConfectioneryView
|
||||
{
|
||||
form.MessageId = (string)dataGridView.Rows[e.RowIndex].Cells["MessageId"].Value;
|
||||
form.ShowDialog();
|
||||
if (form.DialogResult == DialogResult.OK)
|
||||
{
|
||||
MailLoad();
|
||||
}
|
||||
MailLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ namespace ConfectioneryClientApp.Controllers
|
||||
$"<td>{mail.DateDelivery}</td>" +
|
||||
$"<td>{mail.Subject}</td>" +
|
||||
$"<td>{mail.Body}</td>" +
|
||||
$"<td>{mail.HasRead}</td>" +
|
||||
"<td>" + (mail.HasRead ? "Прочитано" : "Непрочитано") + "</td>" +
|
||||
$"<td>{mail.Reply}</td>" +
|
||||
"</tr>");
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
Текст
|
||||
</th>
|
||||
<th>
|
||||
Прочитано
|
||||
Статус
|
||||
</th>
|
||||
<th>
|
||||
Ответ
|
||||
|
Loading…
Reference in New Issue
Block a user