This commit is contained in:
Sergey Kozyrev 2024-04-21 22:53:38 +04:00
parent d1fa06eabc
commit d7f0ea8cfb
3 changed files with 26 additions and 0 deletions

View File

@ -101,6 +101,8 @@ namespace SewingDressesBusinessLogic.BusinessLogic
_logger.LogWarning("Status change failed");
throw new InvalidOperationException("Невозможно перевести состояние заказа");
}
if (element.ImplementId != null)
element.ImplementId = model.ImplementId;
model.Status = status;
if (model.Status == OrderStatus.Выдан) model.DateImplement = DateTime.Now;
_orderStorage.Update(model);

View File

@ -22,4 +22,10 @@
<ProjectReference Include="..\SewingDressesDatabaseImplement\SewingDressesDatabaseImplement.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true" internalLogLevel="Info">
<targets>
<target xsi:type="File" name="tofile" fileName="logs/log-${shortdate}.log" />
</targets>
<target name="console" xsi:type="Console" layout="Access Log|${level:uppercase=true}|${logger}|${message}">
<highlight-row condition="true" foregroundColor="red"/>
</target>
<rules>
<logger name="*" minlevel="Info" writeTo="tofile,console" />
</rules>
</nlog>
</configuration>