fix
This commit is contained in:
parent
bdd6aaa000
commit
bac3eb0a04
@ -24,7 +24,8 @@ namespace ConfectioneryBusinessLogic.BusinessLogics
|
||||
CheckModel(model);
|
||||
if (model.Status != OrderStatus.Неизвестен)
|
||||
{
|
||||
throw new ArgumentException($"Статус заказа должен быть {OrderStatus.Неизвестен}", nameof(model.Status));
|
||||
throw new ArgumentException(
|
||||
$"Статус заказа должен быть {OrderStatus.Неизвестен}", nameof(model));
|
||||
}
|
||||
model.Status = OrderStatus.Принят;
|
||||
model.DateCreate = DateTime.Now;
|
||||
@ -86,10 +87,12 @@ namespace ConfectioneryBusinessLogic.BusinessLogics
|
||||
if ((int)vmodel.Status + 1 != (int)orderStatus)
|
||||
{
|
||||
throw new ArgumentException($"Попытка перевести заказ не в следующий статус: " +
|
||||
$"Текущий статус: {vmodel.Status}" +
|
||||
$"Планируемый статус: {orderStatus}", nameof(vmodel.Status));
|
||||
$"Текущий статус: {vmodel.Status} \n" +
|
||||
$"Планируемый статус: {orderStatus} \n" +
|
||||
$"Доступный статус: {(OrderStatus)((int)vmodel.Status + 1)}",
|
||||
nameof(vmodel));
|
||||
}
|
||||
model.Status++;
|
||||
model.Status = orderStatus;
|
||||
if (_orderStorage.Update(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Update operation failed");
|
||||
|
6
Confectionery/FormPastry.Designer.cs
generated
6
Confectionery/FormPastry.Designer.cs
generated
@ -95,7 +95,7 @@
|
||||
// buttonDel
|
||||
//
|
||||
this.buttonDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonDel.Location = new System.Drawing.Point(680, 107);
|
||||
this.buttonDel.Location = new System.Drawing.Point(680, 158);
|
||||
this.buttonDel.Name = "buttonDel";
|
||||
this.buttonDel.Size = new System.Drawing.Size(90, 33);
|
||||
this.buttonDel.TabIndex = 3;
|
||||
@ -106,7 +106,7 @@
|
||||
// buttonUpd
|
||||
//
|
||||
this.buttonUpd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonUpd.Location = new System.Drawing.Point(680, 53);
|
||||
this.buttonUpd.Location = new System.Drawing.Point(680, 108);
|
||||
this.buttonUpd.Name = "buttonUpd";
|
||||
this.buttonUpd.Size = new System.Drawing.Size(90, 34);
|
||||
this.buttonUpd.TabIndex = 2;
|
||||
@ -116,7 +116,7 @@
|
||||
//
|
||||
// buttonAdd
|
||||
//
|
||||
this.buttonAdd.Location = new System.Drawing.Point(680, 157);
|
||||
this.buttonAdd.Location = new System.Drawing.Point(680, 62);
|
||||
this.buttonAdd.Name = "buttonAdd";
|
||||
this.buttonAdd.Size = new System.Drawing.Size(90, 30);
|
||||
this.buttonAdd.TabIndex = 1;
|
||||
|
@ -66,13 +66,4 @@
|
||||
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Component.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user