Merge branch 'Lab5_Base' into Lab5_Hard

This commit is contained in:
Данияр Аглиуллов 2023-03-05 12:28:30 +04:00
commit 5dc3f27e90

View File

@ -92,14 +92,21 @@ namespace ConfectioneryView
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
if (comboBoxClient.SelectedValue == null)
{
MessageBox.Show("Выберите клиента", "Ошибка",
MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
_logger.LogInformation("Создание заказа");
try
{
var operationResult = _logicO.CreateOrder(new OrderBindingModel
{
ClientId = Convert.ToInt32(comboBoxClient.SelectedValue),
PastryId = Convert.ToInt32(comboBoxPastry.SelectedValue),
Count = Convert.ToInt32(textBoxCount.Text),
Sum = Convert.ToDouble(textBoxSum.Text)
Sum = Convert.ToDouble(textBoxSum.Text),
});
if (!operationResult)
{