правочка
This commit is contained in:
parent
cb96c3be39
commit
0d657d919f
@ -108,6 +108,7 @@ namespace SushiBarView
|
|||||||
{
|
{
|
||||||
if (form.ShowDialog() == DialogResult.OK)
|
if (form.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (form.MenuModel == null)
|
if (form.MenuModel == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -187,11 +188,15 @@ namespace SushiBarView
|
|||||||
PlaceId = comboBoxPlace.SelectedIndex + 1,
|
PlaceId = comboBoxPlace.SelectedIndex + 1,
|
||||||
TaskMenus = _taskMenu
|
TaskMenus = _taskMenu
|
||||||
};
|
};
|
||||||
|
DateTime start = DateTime.Now;
|
||||||
|
|
||||||
var operationResult = _id.HasValue ? _logicT.Update(model) : _logicT.Create(model);
|
var operationResult = _id.HasValue ? _logicT.Update(model) : _logicT.Create(model);
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
throw new Exception("Ошибка при сохранении. Доп информация в логах");
|
throw new Exception("Ошибка при сохранении. Доп информация в логах");
|
||||||
}
|
}
|
||||||
|
DateTime stop = DateTime.Now;
|
||||||
|
MessageBox.Show((stop - start).ToString(), "Test", MessageBoxButtons.OK);
|
||||||
MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show("Сохранение прошло успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
@ -69,7 +69,12 @@ namespace SushiBarView
|
|||||||
|
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
|
DateTime start = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
var _list = _logic.ReadList(null);
|
var _list = _logic.ReadList(null);
|
||||||
|
DateTime stop = DateTime.Now;
|
||||||
|
MessageBox.Show((stop - start).ToString(), "Test", MessageBoxButtons.OK);
|
||||||
if (_list != null)
|
if (_list != null)
|
||||||
{
|
{
|
||||||
dataGridView.DataSource = _list;
|
dataGridView.DataSource = _list;
|
||||||
@ -168,20 +173,16 @@ namespace SushiBarView
|
|||||||
private void buttonTest_Click(object sender, EventArgs e)
|
private void buttonTest_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
CookBindingModel model = new CookBindingModel()
|
TaskBindingModel model = new TaskBindingModel()
|
||||||
{
|
{
|
||||||
Id = 2,
|
Id = 1
|
||||||
CookName = "Иван",
|
|
||||||
CookSurname = "dssfsdfs",
|
|
||||||
Experience = 2,
|
|
||||||
PhoneNumber = "+79054324312",
|
|
||||||
Passport = "123124"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DateTime start = DateTime.Now;
|
DateTime start = DateTime.Now;
|
||||||
_CLogic.Delete(model);
|
_logic.Delete(model);
|
||||||
|
|
||||||
DateTime stop = DateTime.Now;
|
DateTime stop = DateTime.Now;
|
||||||
MessageBox.Show((start - stop).ToString(), "Test", MessageBoxButtons.OK);
|
MessageBox.Show((stop - start).ToString(), "Test", MessageBoxButtons.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,6 @@ namespace SushiBarBusinessLogic.BusinessLogics
|
|||||||
|
|
||||||
public bool Delete(CookBindingModel model)
|
public bool Delete(CookBindingModel model)
|
||||||
{
|
{
|
||||||
CheckModel(model, false);
|
|
||||||
if (_cookStorage.Delete(model) == null)
|
if (_cookStorage.Delete(model) == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user