вроде точно готовая лаба 3
This commit is contained in:
parent
65b5f5e0fb
commit
f14a4ae2e1
@ -29,7 +29,7 @@ namespace ConfectioneryView
|
|||||||
|
|
||||||
private void FormCreateOrder_Load(object sender, EventArgs e)
|
private void FormCreateOrder_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Loading ice cream for order");
|
_logger.LogInformation("Loading pastry for order");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var pastryList = _logicP.ReadList(null);
|
var pastryList = _logicP.ReadList(null);
|
||||||
@ -43,7 +43,7 @@ namespace ConfectioneryView
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error during loading ice cream for order");
|
_logger.LogError(ex, "Error during loading pastry for order");
|
||||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ namespace ConfectioneryView
|
|||||||
if (MessageBox.Show("Удалить запись?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show("Удалить запись?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||||
_logger.LogInformation("Deletion of ice cream");
|
_logger.LogInformation("Deletion of pastry");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!_logic.Delete(new PastryBindingModel { Id = id }))
|
if (!_logic.Delete(new PastryBindingModel { Id = id }))
|
||||||
@ -97,7 +97,7 @@ namespace ConfectioneryView
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Ice cream deletion error");
|
_logger.LogError(ex, "Pastry deletion error");
|
||||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user