beta build
This commit is contained in:
parent
65ea5a95e4
commit
08194a1632
2
Confectionery/Confectionery/FormMain.Designer.cs
generated
2
Confectionery/Confectionery/FormMain.Designer.cs
generated
@ -113,7 +113,7 @@
|
||||
//
|
||||
// referencesToolStripMenuItem
|
||||
//
|
||||
referencesToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { pastriesToolStripMenuItem, componentsToolStripMenuItem });
|
||||
referencesToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { componentsToolStripMenuItem, pastriesToolStripMenuItem });
|
||||
referencesToolStripMenuItem.Name = "referencesToolStripMenuItem";
|
||||
referencesToolStripMenuItem.Size = new Size(139, 29);
|
||||
referencesToolStripMenuItem.Text = "Справочники";
|
||||
|
@ -79,7 +79,7 @@ namespace ConfectioneryView
|
||||
try
|
||||
{
|
||||
var operationResult = _orderLogic.TakeOrderInWork(
|
||||
new OrderBindingModel { Id = id });
|
||||
CreateBindingModel(id));
|
||||
if (!operationResult)
|
||||
{
|
||||
throw new Exception(
|
||||
@ -107,7 +107,7 @@ namespace ConfectioneryView
|
||||
try
|
||||
{
|
||||
var operationResult = _orderLogic.FinishOrder(
|
||||
new OrderBindingModel { Id = id });
|
||||
CreateBindingModel(id));
|
||||
if (!operationResult)
|
||||
{
|
||||
throw new Exception("Ошибка при сохранении. " +
|
||||
@ -134,7 +134,7 @@ namespace ConfectioneryView
|
||||
try
|
||||
{
|
||||
var operationResult = _orderLogic.DeliveryOrder(
|
||||
new OrderBindingModel { Id = id });
|
||||
CreateBindingModel(id));
|
||||
if (!operationResult)
|
||||
{
|
||||
throw new Exception("Ошибка при сохранении. " +
|
||||
@ -155,5 +155,22 @@ namespace ConfectioneryView
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
private OrderBindingModel CreateBindingModel(int id, bool isDone = false)
|
||||
{
|
||||
return new OrderBindingModel
|
||||
{
|
||||
Id = id,
|
||||
PastryId = Convert.ToInt32(dataGridView.SelectedRows[
|
||||
0].Cells["PastryId"].Value),
|
||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[
|
||||
0].Cells["Status"].Value.ToString()),
|
||||
Count = Convert.ToInt32(dataGridView.SelectedRows[
|
||||
0].Cells["Count"].Value),
|
||||
Sum = double.Parse(dataGridView.SelectedRows[
|
||||
0].Cells["Sum"].Value.ToString()),
|
||||
DateCreate = DateTime.Parse(dataGridView.SelectedRows[
|
||||
0].Cells["DateCreate"].Value.ToString()),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user