Compare commits
8 Commits
3b047267ca
...
Lab3
| Author | SHA1 | Date | |
|---|---|---|---|
| 602d6e59fd | |||
| aeaadd26e2 | |||
| eac99266b6 | |||
| cc9d4a9be8 | |||
| 0bffe6af31 | |||
| f0c1a6f0d4 | |||
| f61dd42abb | |||
| fc16961555 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -240,6 +240,7 @@ ClientBin/
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
*.txt
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
|
||||
883
Log20241205.txt
883
Log20241205.txt
@@ -1,883 +0,0 @@
|
||||
2024-12-05 16:59:56.918 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 16:59:57.689 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 17:00:14.147 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 17:00:14.203 +04:00 [DBG] Объект: {"Id":0,"AgencyId":1,"FormFactorId":2,"Area":21.0,"PricePerSM":11.0,"BasePrice":231.0,"DesiredPrice":11.0}
|
||||
2024-12-05 17:00:14.270 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:00:14.283 +04:00 [DBG] Полученные объекты: [{"Id":5,"AgencyId":0,"FormFactorId":0,"Area":21.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:00:36.942 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:00:37.478 +04:00 [DBG] Полученные объекты: [{"Id":5,"AgencyId":0,"FormFactorId":0,"Area":21.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:01:51.571 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 17:01:52.123 +04:00 [DBG] Объект: {"Id":0,"AgencyId":1,"FormFactorId":0,"Area":26.0,"PricePerSM":86.0,"BasePrice":2236.0,"DesiredPrice":6500.0}
|
||||
2024-12-05 17:02:44.274 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:02:44.276 +04:00 [DBG] Полученные объекты: [{"Id":5,"AgencyId":0,"FormFactorId":0,"Area":21.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0},{"Id":6,"AgencyId":0,"FormFactorId":0,"Area":26.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:07:30.393 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:07:30.950 +04:00 [DBG] Полученные объекты: [{"Id":5,"AgencyId":0,"FormFactorId":0,"Area":21.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0},{"Id":6,"AgencyId":0,"FormFactorId":0,"Area":26.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:07:33.920 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 17:07:33.921 +04:00 [DBG] Объект: 5
|
||||
2024-12-05 17:07:33.956 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:07:33.957 +04:00 [DBG] Полученные объекты: [{"Id":6,"AgencyId":0,"FormFactorId":0,"Area":26.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:07:35.443 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 17:07:35.443 +04:00 [DBG] Объект: 6
|
||||
2024-12-05 17:07:35.447 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:07:35.449 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 17:17:20.736 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:17:21.264 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 17:17:25.463 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 17:17:25.491 +04:00 [DBG] Объект: {"Id":0,"AgencyId":0,"FormFactorId":0,"Area":1.0,"PricePerSM":1.0,"BasePrice":1.0,"DesiredPrice":1.0}
|
||||
2024-12-05 17:17:25.552 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:17:25.560 +04:00 [DBG] Полученные объекты: [{"Id":7,"AgencyId":0,"FormFactorId":0,"Area":1.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:17:28.195 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 17:17:28.196 +04:00 [DBG] Объект: 7
|
||||
2024-12-05 17:17:28.206 +04:00 [DBG] Найден объект: {"Id":7,"AgencyId":0,"FormFactorId":0,"Area":1.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}
|
||||
2024-12-05 17:17:31.306 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:17:31.307 +04:00 [DBG] Полученные объекты: [{"Id":7,"AgencyId":0,"FormFactorId":0,"Area":1.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:17:33.992 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 17:17:33.992 +04:00 [DBG] Объект: 7
|
||||
2024-12-05 17:17:33.995 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:17:33.995 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 17:22:17.160 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:22:17.654 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 17:22:21.568 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 17:22:21.596 +04:00 [DBG] Объект: {"Id":0,"AgencyId":0,"FormFactorId":2,"Area":1.0,"PricePerSM":1.0,"BasePrice":1.0,"DesiredPrice":1.0}
|
||||
2024-12-05 17:22:21.648 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:22:21.654 +04:00 [DBG] Полученные объекты: [{"Id":8,"AgencyId":0,"FormFactorId":0,"Area":10.0,"PricePerSM":0.0,"BasePrice":0.0,"DesiredPrice":0.0}]
|
||||
2024-12-05 17:29:48.090 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:29:49.070 +04:00 [DBG] Полученные объекты: [{"Id":8,"Agency_ID":1,"Form_factor_ID":0,"Area":10.0,"Price_per_SM":10.0,"Base_price":20.0,"Desired_price":100.0}]
|
||||
2024-12-05 17:32:27.333 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:32:27.824 +04:00 [DBG] Полученные объекты: [{"Id":8,"Agency_ID":1,"Form_factor_ID":0,"Area":10.0,"Price_per_SM":10.0,"Base_price":20.0,"Desired_price":100.0}]
|
||||
2024-12-05 17:32:38.785 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 17:32:38.785 +04:00 [DBG] Объект: {"Id":0,"Agency_ID":0,"Form_factor_ID":5,"Area":6.0,"Price_per_SM":11.0,"Base_price":66.0,"Desired_price":16.0}
|
||||
2024-12-05 17:32:38.860 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:32:38.861 +04:00 [DBG] Полученные объекты: [{"Id":8,"Agency_ID":1,"Form_factor_ID":0,"Area":10.0,"Price_per_SM":10.0,"Base_price":20.0,"Desired_price":100.0},{"Id":9,"Agency_ID":0,"Form_factor_ID":5,"Area":6.0,"Price_per_SM":11.0,"Base_price":66.0,"Desired_price":16.0}]
|
||||
2024-12-05 17:32:43.587 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 17:32:43.587 +04:00 [DBG] Объект: 9
|
||||
2024-12-05 17:32:43.597 +04:00 [DBG] Найден объект: {"Id":9,"Agency_ID":0,"Form_factor_ID":5,"Area":6.0,"Price_per_SM":11.0,"Base_price":66.0,"Desired_price":16.0}
|
||||
2024-12-05 17:32:45.444 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:32:45.446 +04:00 [DBG] Полученные объекты: [{"Id":8,"Agency_ID":1,"Form_factor_ID":0,"Area":10.0,"Price_per_SM":10.0,"Base_price":20.0,"Desired_price":100.0},{"Id":9,"Agency_ID":0,"Form_factor_ID":5,"Area":6.0,"Price_per_SM":11.0,"Base_price":66.0,"Desired_price":16.0}]
|
||||
2024-12-05 17:32:48.494 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 17:32:48.495 +04:00 [DBG] Объект: 8
|
||||
2024-12-05 17:32:48.508 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:32:48.509 +04:00 [DBG] Полученные объекты: [{"Id":9,"Agency_ID":0,"Form_factor_ID":5,"Area":6.0,"Price_per_SM":11.0,"Base_price":66.0,"Desired_price":16.0}]
|
||||
2024-12-05 17:32:49.942 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 17:32:49.942 +04:00 [DBG] Объект: 9
|
||||
2024-12-05 17:32:49.944 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 17:32:49.946 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 19:43:56.621 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 19:43:57.328 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 19:44:15.217 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 19:44:15.264 +04:00 [DBG] Объект: {"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}
|
||||
2024-12-05 19:44:15.333 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 19:44:15.341 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}]
|
||||
2024-12-05 19:44:19.531 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 19:44:19.531 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 19:44:19.539 +04:00 [DBG] Найден объект: {"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}
|
||||
2024-12-05 19:44:21.942 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 19:44:21.944 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}]
|
||||
2024-12-05 19:44:22.648 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 19:44:22.648 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 19:44:22.649 +04:00 [DBG] Найден объект: {"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}
|
||||
2024-12-05 19:44:23.892 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 19:44:23.893 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"GBkfdfkfsdkgdf jdfgk","Passport_series":1117,"Passport_number":526638}]
|
||||
2024-12-05 19:44:25.843 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 19:44:25.843 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 19:44:25.855 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 19:44:25.856 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:00:11.058 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:00:11.605 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:00:21.200 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:00:21.232 +04:00 [DBG] Объект: {"Id":0,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:00:21.290 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:00:21.303 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:00:23.491 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:00:23.492 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:00:23.501 +04:00 [DBG] Найден объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:00:26.744 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:00:26.744 +04:00 [DBG] Объект: {"Id":1,"Name":"sdfwdf","Price":220.0}
|
||||
2024-12-05 20:00:26.863 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Price")
|
||||
|
||||
POSITION: 48
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ServicesRepository.UpdateService(Services service) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ServicesRepository.cs:line 112
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Price")
|
||||
Position: 48
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:00:34.050 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:00:34.050 +04:00 [DBG] Объект: {"Id":1,"Name":"sdfwdf","Price":220.0}
|
||||
2024-12-05 20:00:34.117 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Price")
|
||||
|
||||
POSITION: 48
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ServicesRepository.UpdateService(Services service) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ServicesRepository.cs:line 112
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Price")
|
||||
Position: 48
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:00:39.490 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:00:39.491 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:01:49.928 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:01:50.482 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:01:51.790 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:01:51.791 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:01:51.822 +04:00 [DBG] Найден объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:01:57.288 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:01:57.288 +04:00 [DBG] Объект: {"Id":1,"Name":"Hort","Price":220.0}
|
||||
2024-12-05 20:01:57.365 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Price")
|
||||
|
||||
POSITION: 44
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ServicesRepository.UpdateService(Services service) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ServicesRepository.cs:line 112
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Price")
|
||||
Position: 44
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:02:02.731 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:02:02.732 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:02:29.837 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:02:30.429 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:02:31.521 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:02:31.522 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:02:31.547 +04:00 [DBG] Найден объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:02:32.781 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:02:32.781 +04:00 [DBG] Объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:02:32.873 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Price")
|
||||
|
||||
POSITION: 44
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ServicesRepository.UpdateService(Services service) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ServicesRepository.cs:line 112
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Price")
|
||||
Position: 44
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:02:46.517 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:02:46.518 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:02:57.926 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:02:57.926 +04:00 [DBG] Объект: {"Id":0,"Name":"first","Price":520.0}
|
||||
2024-12-05 20:02:57.938 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:02:57.939 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0},{"Id":2,"Name":"first","Price":520.0}]
|
||||
2024-12-05 20:03:00.997 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:03:00.997 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 20:03:00.999 +04:00 [DBG] Найден объект: {"Id":2,"Name":"first","Price":520.0}
|
||||
2024-12-05 20:03:05.265 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:03:05.265 +04:00 [DBG] Объект: {"Id":2,"Name":"sec","Price":520.0}
|
||||
2024-12-05 20:03:05.340 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Price")
|
||||
|
||||
POSITION: 44
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ServicesRepository.UpdateService(Services service) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ServicesRepository.cs:line 112
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Price")
|
||||
Position: 44
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:03:30.505 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:30.506 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0},{"Id":2,"Name":"first","Price":520.0}]
|
||||
2024-12-05 20:03:33.953 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:33.955 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:03:38.627 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:03:38.629 +04:00 [DBG] Объект: {"Id":0,"Full_name":"sdghkdnkff","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 20:03:38.642 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:38.644 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"sdghkdnkff","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 20:03:40.297 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:03:40.298 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 20:03:40.299 +04:00 [DBG] Найден объект: {"Id":0,"Full_name":"sdghkdnkff","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 20:03:42.867 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:03:42.868 +04:00 [DBG] Объект: {"Id":0,"Full_name":"sdnfjwe","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 20:03:42.922 +04:00 [DBG] Ошибка при редактировании объекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Passport_series")
|
||||
|
||||
POSITION: 46
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.BuyerRepository.UpdateBuyer(Buyer buyer) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\BuyerRepository.cs:line 113
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Passport_series")
|
||||
Position: 46
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:03:48.372 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:48.373 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"sdghkdnkff","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 20:03:50.289 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:03:50.289 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 20:03:50.292 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:50.292 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:03:54.390 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:54.396 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:03:59.278 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:03:59.280 +04:00 [DBG] Объект: {"Id":0,"Agency_ID":0,"Form_factor_ID":1,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:03:59.296 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:03:59.299 +04:00 [DBG] Полученные объекты: [{"Id":10,"Agency_ID":0,"Form_factor_ID":1,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:04:00.490 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:04:00.491 +04:00 [DBG] Объект: 10
|
||||
2024-12-05 20:04:00.492 +04:00 [DBG] Найден объект: {"Id":10,"Agency_ID":0,"Form_factor_ID":1,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:04:03.245 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:04:03.246 +04:00 [DBG] Объект: {"Id":10,"Agency_ID":0,"Form_factor_ID":1,"Area":1.0,"Price_per_SM":16.0,"Base_price":16.0,"Desired_price":1.0}
|
||||
2024-12-05 20:04:03.308 +04:00 [ERR] Ошибка при редактировании оьъекта
|
||||
Npgsql.PostgresException (0x80004005): 42601: ошибка синтаксиса (примерное положение: "Form_Factor_ID")
|
||||
|
||||
POSITION: 56
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ApartmentRepository.UpdateApartment(Apartment apartment) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ApartmentRepository.cs:line 56
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42601
|
||||
MessageText: ошибка синтаксиса (примерное положение: "Form_Factor_ID")
|
||||
Position: 56
|
||||
File: scan.l
|
||||
Line: 1246
|
||||
Routine: scanner_yyerror
|
||||
2024-12-05 20:04:06.539 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:06.540 +04:00 [DBG] Полученные объекты: [{"Id":10,"Agency_ID":0,"Form_factor_ID":1,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:04:08.058 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:04:08.058 +04:00 [DBG] Объект: 10
|
||||
2024-12-05 20:04:08.062 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:08.062 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:04:28.344 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:28.835 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0},{"Id":2,"Name":"first","Price":520.0}]
|
||||
2024-12-05 20:04:29.887 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:04:29.887 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:04:29.913 +04:00 [DBG] Найден объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:04:30.882 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:04:30.882 +04:00 [DBG] Объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:04:30.922 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:30.923 +04:00 [DBG] Полученные объекты: [{"Id":2,"Name":"first","Price":520.0},{"Id":1,"Name":"fghkdf","Price":220.0}]
|
||||
2024-12-05 20:04:34.753 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:04:34.753 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 20:04:34.754 +04:00 [DBG] Найден объект: {"Id":2,"Name":"first","Price":520.0}
|
||||
2024-12-05 20:04:37.974 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:04:37.974 +04:00 [DBG] Объект: {"Id":2,"Name":"fkbnkdfk","Price":520.0}
|
||||
2024-12-05 20:04:37.986 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:37.987 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"fghkdf","Price":220.0},{"Id":2,"Name":"fkbnkdfk","Price":520.0}]
|
||||
2024-12-05 20:04:42.719 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:04:42.719 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:04:42.721 +04:00 [DBG] Найден объект: {"Id":1,"Name":"fghkdf","Price":220.0}
|
||||
2024-12-05 20:04:50.117 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:04:50.117 +04:00 [DBG] Объект: {"Id":1,"Name":"first","Price":220.0}
|
||||
2024-12-05 20:04:50.124 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:50.125 +04:00 [DBG] Полученные объекты: [{"Id":2,"Name":"fkbnkdfk","Price":520.0},{"Id":1,"Name":"first","Price":220.0}]
|
||||
2024-12-05 20:04:54.649 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:04:54.649 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 20:04:54.651 +04:00 [DBG] Найден объект: {"Id":2,"Name":"fkbnkdfk","Price":520.0}
|
||||
2024-12-05 20:04:59.205 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:04:59.205 +04:00 [DBG] Объект: {"Id":2,"Name":"second","Price":520.0}
|
||||
2024-12-05 20:04:59.212 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:04:59.213 +04:00 [DBG] Полученные объекты: [{"Id":1,"Name":"first","Price":220.0},{"Id":2,"Name":"second","Price":520.0}]
|
||||
2024-12-05 20:05:02.797 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:05:02.797 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:05:02.803 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:05:02.804 +04:00 [DBG] Полученные объекты: [{"Id":2,"Name":"second","Price":520.0}]
|
||||
2024-12-05 20:05:03.469 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:05:03.470 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 20:05:03.473 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:05:03.474 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:05:38.424 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:05:38.861 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:05:42.852 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:05:42.888 +04:00 [DBG] Объект: {"Id":0,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:05:42.946 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:05:42.955 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:05:44.252 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:05:44.253 +04:00 [DBG] Объект: 11
|
||||
2024-12-05 20:05:44.261 +04:00 [DBG] Найден объект: {"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:05:49.571 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:05:49.571 +04:00 [DBG] Объект: {"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":16.0,"Price_per_SM":16.0,"Base_price":256.0,"Desired_price":31.0}
|
||||
2024-12-05 20:05:49.643 +04:00 [ERR] Ошибка при редактировании оьъекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "agenceid" не существует
|
||||
|
||||
POSITION: 42
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ApartmentRepository.UpdateApartment(Apartment apartment) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ApartmentRepository.cs:line 56
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "agenceid" не существует
|
||||
Hint: Возможно, предполагалась ссылка на столбец "apartment.agency_id".
|
||||
Position: 42
|
||||
File: parse_relation.c
|
||||
Line: 3738
|
||||
Routine: errorMissingColumn
|
||||
2024-12-05 20:05:59.358 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:05:59.359 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:06:58.734 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:06:59.332 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:07:00.769 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:07:00.769 +04:00 [DBG] Объект: 11
|
||||
2024-12-05 20:07:00.800 +04:00 [DBG] Найден объект: {"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:07:06.589 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:07:06.589 +04:00 [DBG] Объект: {"Id":11,"Agency_ID":0,"Form_factor_ID":3,"Area":16.0,"Price_per_SM":16.0,"Base_price":256.0,"Desired_price":1.0}
|
||||
2024-12-05 20:07:06.674 +04:00 [ERR] Ошибка при редактировании оьъекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "agencyid" в таблице "apartment" не существует
|
||||
|
||||
POSITION: 30
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.ApartmentRepository.UpdateApartment(Apartment apartment) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\ApartmentRepository.cs:line 56
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "agencyid" в таблице "apartment" не существует
|
||||
Position: 30
|
||||
File: analyze.c
|
||||
Line: 2532
|
||||
Routine: transformUpdateTargetList
|
||||
2024-12-05 20:07:16.900 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:07:16.901 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:07:44.755 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:07:45.283 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:07:46.999 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:07:46.999 +04:00 [DBG] Объект: 11
|
||||
2024-12-05 20:07:47.028 +04:00 [DBG] Найден объект: {"Id":11,"Agency_ID":0,"Form_factor_ID":2,"Area":1.0,"Price_per_SM":1.0,"Base_price":1.0,"Desired_price":1.0}
|
||||
2024-12-05 20:07:57.018 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:07:57.018 +04:00 [DBG] Объект: {"Id":11,"Agency_ID":1,"Form_factor_ID":6,"Area":16.0,"Price_per_SM":16.0,"Base_price":256.0,"Desired_price":1.0}
|
||||
2024-12-05 20:07:57.050 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:07:57.052 +04:00 [DBG] Полученные объекты: [{"Id":11,"Agency_ID":1,"Form_factor_ID":6,"Area":16.0,"Price_per_SM":16.0,"Base_price":256.0,"Desired_price":1.0}]
|
||||
2024-12-05 20:08:01.777 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:08:01.777 +04:00 [DBG] Объект: 11
|
||||
2024-12-05 20:08:01.781 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:08:01.782 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:08:05.937 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:08:05.940 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:08:26.632 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:08:26.637 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Gthsdlff sarff gosd ","Passport_series":9999,"Passport_number":335588}
|
||||
2024-12-05 20:08:26.649 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:08:26.653 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Gthsdlff sarff gosd ","Passport_series":9999,"Passport_number":335588}]
|
||||
2024-12-05 20:08:29.152 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 20:08:29.153 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 20:08:29.154 +04:00 [DBG] Найден объект: {"Id":0,"Full_name":"Gthsdlff sarff gosd ","Passport_series":9999,"Passport_number":335588}
|
||||
2024-12-05 20:08:35.113 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 20:08:35.113 +04:00 [DBG] Объект: {"Id":0,"Full_name":"FF rtih eo ","Passport_series":9999,"Passport_number":335588}
|
||||
2024-12-05 20:08:35.122 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:08:35.123 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"FF rtih eo ","Passport_series":9999,"Passport_number":335588}]
|
||||
2024-12-05 20:08:38.123 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:08:38.123 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 20:08:38.125 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:08:38.126 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:09.105 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:09.572 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:11.124 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:11.134 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:14.963 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:14.964 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:17.707 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:17.708 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:42.786 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:15:42.802 +04:00 [DBG] Объект: {"Id":0,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}
|
||||
2024-12-05 20:15:42.837 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:42.848 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}]
|
||||
2024-12-05 20:15:46.776 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:46.777 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:15:48.409 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:15:48.410 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}]
|
||||
2024-12-05 20:16:05.117 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:16:05.122 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Name":"XXXXx","Cost":54545.0}
|
||||
2024-12-05 20:16:05.136 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:16:05.139 +04:00 [DBG] Полученные объекты: [{"Id":1,"Apartment_ID":12,"Name":"XXXXx","Cost":54545.0}]
|
||||
2024-12-05 20:16:08.613 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:16:08.614 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}]
|
||||
2024-12-05 20:16:15.877 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:16:15.877 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0}
|
||||
2024-12-05 20:16:15.892 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:16:15.893 +04:00 [DBG] Полученные объекты: [{"Id":1,"Apartment_ID":12,"Name":"XXXXx","Cost":54545.0},{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0}]
|
||||
2024-12-05 20:16:19.405 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 20:16:19.405 +04:00 [DBG] Объект: 1
|
||||
2024-12-05 20:16:19.409 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:16:19.410 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0}]
|
||||
2024-12-05 20:56:35.569 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:36.320 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:56:41.653 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:41.699 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}]
|
||||
2024-12-05 20:56:41.702 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:41.706 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:56:41.717 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:41.721 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:56:47.604 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:47.605 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:56:50.215 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:56:50.217 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0}]
|
||||
2024-12-05 20:57:19.358 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:57:19.360 +04:00 [DBG] Объект: {"Id":0,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}
|
||||
2024-12-05 20:57:19.424 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:57:19.425 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 20:57:23.445 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:57:23.445 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 20:57:44.872 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:57:44.875 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 20:57:44.890 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:57:44.895 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 20:58:01.977 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:58:01.977 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Второй Б Б","Passport_series":5566,"Passport_number":995577}
|
||||
2024-12-05 20:58:02.097 +04:00 [ERR] Ошибка при добавлении объекта
|
||||
Npgsql.PostgresException (0x80004005): 23505: повторяющееся значение ключа нарушает ограничение уникальности "buyer_pkey"
|
||||
|
||||
DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.BuyerRepository.CreateBuyer(Buyer buyer) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\BuyerRepository.cs:line 31
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 23505
|
||||
MessageText: повторяющееся значение ключа нарушает ограничение уникальности "buyer_pkey"
|
||||
Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
SchemaName: public
|
||||
TableName: buyer
|
||||
ConstraintName: buyer_pkey
|
||||
File: nbtinsert.c
|
||||
Line: 673
|
||||
Routine: _bt_check_unique
|
||||
2024-12-05 20:58:18.449 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 20:58:18.449 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Второй Б Б","Passport_series":5566,"Passport_number":995577}
|
||||
2024-12-05 20:58:18.510 +04:00 [ERR] Ошибка при добавлении объекта
|
||||
Npgsql.PostgresException (0x80004005): 23505: повторяющееся значение ключа нарушает ограничение уникальности "buyer_pkey"
|
||||
|
||||
DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.BuyerRepository.CreateBuyer(Buyer buyer) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\BuyerRepository.cs:line 31
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 23505
|
||||
MessageText: повторяющееся значение ключа нарушает ограничение уникальности "buyer_pkey"
|
||||
Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
SchemaName: public
|
||||
TableName: buyer
|
||||
ConstraintName: buyer_pkey
|
||||
File: nbtinsert.c
|
||||
Line: 673
|
||||
Routine: _bt_check_unique
|
||||
2024-12-05 20:58:34.403 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:58:34.405 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 20:59:59.294 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 20:59:59.802 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 21:00:09.332 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:00:09.332 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 21:00:09.376 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:00:09.378 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111},{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111}]
|
||||
2024-12-05 21:00:26.494 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:00:26.494 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721}
|
||||
2024-12-05 21:00:26.507 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:00:26.509 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111},{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721}]
|
||||
2024-12-05 21:00:32.979 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:00:32.980 +04:00 [DBG] Полученные объекты: [{"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111},{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721}]
|
||||
2024-12-05 21:00:36.278 +04:00 [INF] Получение объекта по идентификатору
|
||||
2024-12-05 21:00:36.278 +04:00 [DBG] Объект: 0
|
||||
2024-12-05 21:00:36.286 +04:00 [DBG] Найден объект: {"Id":0,"Full_name":"Первый А А","Passport_series":1111,"Passport_number":111111}
|
||||
2024-12-05 21:00:46.628 +04:00 [INF] Редактирование объекта
|
||||
2024-12-05 21:00:46.628 +04:00 [DBG] Объект: {"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}
|
||||
2024-12-05 21:00:46.650 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:00:46.651 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:00:55.278 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:00:55.283 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:01:05.061 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:01:05.064 +04:00 [DBG] Объект: {"Id":0,"Name":"Первая","Price":5000.0}
|
||||
2024-12-05 21:01:05.074 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:05.079 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0}]
|
||||
2024-12-05 21:01:13.043 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:01:13.043 +04:00 [DBG] Объект: {"Id":0,"Name":"Вторая","Price":7500.0}
|
||||
2024-12-05 21:01:13.051 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:13.052 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:01:17.860 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:17.866 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0}]
|
||||
2024-12-05 21:01:19.996 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:20.002 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:01:38.706 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:01:38.707 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":13,"Name":"Первая","Cost":600.0}
|
||||
2024-12-05 21:01:38.722 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:38.723 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0},{"Id":3,"Apartment_ID":13,"Name":"Первая","Cost":600.0}]
|
||||
2024-12-05 21:01:46.279 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:46.282 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:01:47.831 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:47.832 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:01:47.832 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:47.833 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:01:47.834 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:01:47.835 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:02:49.087 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:02:49.088 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:09:39.862 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:09:40.368 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:09:41.956 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:09:41.984 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:09:41.986 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:09:41.992 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:09:41.995 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:09:41.998 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:12:11.401 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:12:11.887 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:12:13.175 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:12:13.203 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:12:13.205 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:12:13.212 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:12:13.215 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:12:13.218 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:16:42.281 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:16:42.747 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:16:44.041 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:16:44.063 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:16:44.065 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:16:44.071 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:16:44.074 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:16:44.077 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:22:01.525 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:22:02.035 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:22:03.192 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:22:03.213 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:22:03.214 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:22:03.221 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:22:03.224 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:22:03.229 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:28:32.099 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:28:32.586 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:28:34.069 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:28:34.094 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:28:34.096 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:28:34.103 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:28:34.106 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:28:34.110 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:28:48.022 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:28:48.033 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T21:28:34.1110634+04:00","DealServices":[{"Services_ID":3,"Deal_ID":0,"Execution_time":500.0}]}
|
||||
2024-12-05 21:28:48.180 +04:00 [ERR] Ошибка при добавлении объекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "deal_id" не существует
|
||||
|
||||
POSITION: 82
|
||||
DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.DealRepository.CreateDeal(Deal deal) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\DealRepository.cs:line 41
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "deal_id" не существует
|
||||
Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
Position: 82
|
||||
File: parse_relation.c
|
||||
Line: 3715
|
||||
Routine: errorMissingColumn
|
||||
2024-12-05 21:29:01.982 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:29:01.983 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:30:53.826 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:30:54.375 +04:00 [DBG] Полученные объекты: []
|
||||
2024-12-05 21:30:55.831 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:30:55.852 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:30:55.854 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:30:55.861 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:30:55.864 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:30:55.868 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:31:07.212 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:31:07.221 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T21:30:55.8687558+04:00","DealServices":[{"Services_ID":3,"Deal_ID":0,"Execution_time":500.0}]}
|
||||
2024-12-05 21:31:07.293 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:31:07.297 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:31:19.191 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:31:19.192 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:31:19.192 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:31:19.193 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:31:19.193 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:31:19.194 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:31:41.971 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:31:41.971 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T21:31:19.1945892+04:00","DealServices":[{"Services_ID":4,"Deal_ID":0,"Execution_time":779.0},{"Services_ID":3,"Deal_ID":0,"Execution_time":100.0}]}
|
||||
2024-12-05 21:31:41.985 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:31:41.991 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:34:12.324 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:34:12.845 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:34:17.595 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:34:17.595 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 21:34:17.723 +04:00 [ERR] Ошибка при удалении объекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "id" не существует
|
||||
|
||||
POSITION: 36
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.DealRepository.DeleteDeal(Int32 id) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\DealRepository.cs:line 64
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "id" не существует
|
||||
Position: 36
|
||||
File: parse_relation.c
|
||||
Line: 3727
|
||||
Routine: errorMissingColumn
|
||||
2024-12-05 21:35:20.354 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:35:20.884 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:35:23.098 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:35:23.099 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 21:35:23.205 +04:00 [ERR] Ошибка при удалении объекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "id" не существует
|
||||
|
||||
POSITION: 36
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.DealRepository.DeleteDeal(Int32 id) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\DealRepository.cs:line 64
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "id" не существует
|
||||
Position: 36
|
||||
File: parse_relation.c
|
||||
Line: 3727
|
||||
Routine: errorMissingColumn
|
||||
2024-12-05 21:35:28.552 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:35:28.552 +04:00 [DBG] Объект: 2
|
||||
2024-12-05 21:35:28.598 +04:00 [ERR] Ошибка при удалении объекта
|
||||
Npgsql.PostgresException (0x80004005): 42703: столбец "id" не существует
|
||||
|
||||
POSITION: 36
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.DealRepository.DeleteDeal(Int32 id) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\DealRepository.cs:line 64
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 42703
|
||||
MessageText: столбец "id" не существует
|
||||
Position: 36
|
||||
File: parse_relation.c
|
||||
Line: 3727
|
||||
Routine: errorMissingColumn
|
||||
2024-12-05 21:36:56.445 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:36:56.989 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:37:09.885 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:37:11.079 +04:00 [DBG] Объект: 3
|
||||
2024-12-05 21:38:25.458 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:38:26.003 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:38:26.979 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:38:26.986 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:38:26.988 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:38:26.995 +04:00 [DBG] Полученные объекты: [{"Id":1,"Full_name":"Второй Б Б","Passport_series":1111,"Passport_number":111111},{"Id":2,"Full_name":"Третий Т Т","Passport_series":5522,"Passport_number":667721},{"Id":0,"Full_name":"Первый А А","Passport_series":2299,"Passport_number":554466}]
|
||||
2024-12-05 21:38:26.997 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:38:27.001 +04:00 [DBG] Полученные объекты: [{"Id":3,"Name":"Первая","Price":5000.0},{"Id":4,"Name":"Вторая","Price":7500.0}]
|
||||
2024-12-05 21:38:41.334 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:38:41.338 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T21:38:27.0014282+04:00","DealServices":[{"Services_ID":4,"Deal_ID":0,"Execution_time":20495.0}]}
|
||||
2024-12-05 21:38:41.414 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:38:41.415 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":4,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:38:45.319 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:38:45.320 +04:00 [DBG] Объект: 3
|
||||
2024-12-05 21:38:45.400 +04:00 [ERR] Ошибка при удалении объекта
|
||||
Npgsql.PostgresException (0x80004005): 23503: UPDATE или DELETE в таблице "deal" нарушает ограничение внешнего ключа "services_deal_deal_id_fkey" таблицы "services_deal"
|
||||
|
||||
DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
|
||||
at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
|
||||
at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader) in /_/Dapper/SqlMapper.cs:line 2965
|
||||
at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command) in /_/Dapper/SqlMapper.cs:line 656
|
||||
at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in /_/Dapper/SqlMapper.cs:line 527
|
||||
at RealEstateTransactions.Repositories.Implementations.DealRepository.DeleteDeal(Int32 id) in C:\my\курс 2 сим 1\ОТП\Lab\RealEstateTransactions\RealEstateTransactions\Repositories\Implementations\DealRepository.cs:line 64
|
||||
Exception data:
|
||||
Severity: ОШИБКА
|
||||
SqlState: 23503
|
||||
MessageText: UPDATE или DELETE в таблице "deal" нарушает ограничение внешнего ключа "services_deal_deal_id_fkey" таблицы "services_deal"
|
||||
Detail: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.
|
||||
SchemaName: public
|
||||
TableName: services_deal
|
||||
ConstraintName: services_deal_deal_id_fkey
|
||||
File: ri_triggers.c
|
||||
Line: 2633
|
||||
Routine: ri_ReportViolation
|
||||
2024-12-05 21:54:27.321 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:28.007 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":3,"Apartment_ID":13,"Buyer_ID":2,"Deal_price":52333.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":4,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:54:31.056 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:54:31.056 +04:00 [DBG] Объект: 3
|
||||
2024-12-05 21:54:31.125 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:31.126 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]},{"Id":4,"Apartment_ID":12,"Buyer_ID":1,"Deal_price":0.0,"Deal_date":"2024-12-05T00:00:00","DealServices":[]}]
|
||||
2024-12-05 21:54:39.479 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:39.489 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0},{"Id":3,"Apartment_ID":13,"Name":"Первая","Cost":600.0}]
|
||||
2024-12-05 21:54:41.959 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:41.966 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
2024-12-05 21:54:47.221 +04:00 [INF] Добавление объекта
|
||||
2024-12-05 21:54:47.221 +04:00 [DBG] Объект: {"Id":0,"Apartment_ID":12,"Name":"wsryt","Cost":8775.0}
|
||||
2024-12-05 21:54:47.248 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:47.249 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0},{"Id":3,"Apartment_ID":13,"Name":"Первая","Cost":600.0},{"Id":4,"Apartment_ID":12,"Name":"wsryt","Cost":8775.0}]
|
||||
2024-12-05 21:54:51.618 +04:00 [INF] Удаление объекта
|
||||
2024-12-05 21:54:51.618 +04:00 [DBG] Объект: 3
|
||||
2024-12-05 21:54:51.620 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:51.621 +04:00 [DBG] Полученные объекты: [{"Id":2,"Apartment_ID":12,"Name":"fgnj","Cost":1000000.0},{"Id":4,"Apartment_ID":12,"Name":"wsryt","Cost":8775.0}]
|
||||
2024-12-05 21:54:54.697 +04:00 [INF] Получение всех объектов
|
||||
2024-12-05 21:54:54.698 +04:00 [DBG] Полученные объекты: [{"Id":12,"Agency_ID":1,"Form_factor_ID":1,"Area":16.0,"Price_per_SM":5000.0,"Base_price":80000.0,"Desired_price":100000.0},{"Id":13,"Agency_ID":2,"Form_factor_ID":4,"Area":41.0,"Price_per_SM":7500.0,"Base_price":307500.0,"Desired_price":350000.0}]
|
||||
@@ -37,6 +37,9 @@
|
||||
допродажныеУслугиToolStripMenuItem = new ToolStripMenuItem();
|
||||
сделкиToolStripMenuItem = new ToolStripMenuItem();
|
||||
отчётToolStripMenuItem = new ToolStripMenuItem();
|
||||
DirectoryReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
PriceReportToolStripMenuItem = new ToolStripMenuItem();
|
||||
ChartReportToolStripMenuItem1 = new ToolStripMenuItem();
|
||||
menuStrip1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
@@ -60,21 +63,21 @@
|
||||
// квартирыToolStripMenuItem
|
||||
//
|
||||
квартирыToolStripMenuItem.Name = "квартирыToolStripMenuItem";
|
||||
квартирыToolStripMenuItem.Size = new Size(224, 26);
|
||||
квартирыToolStripMenuItem.Size = new Size(174, 26);
|
||||
квартирыToolStripMenuItem.Text = "Квартиры";
|
||||
квартирыToolStripMenuItem.Click += КвартирыToolStripMenuItem_Click;
|
||||
//
|
||||
// покупателиToolStripMenuItem
|
||||
//
|
||||
покупателиToolStripMenuItem.Name = "покупателиToolStripMenuItem";
|
||||
покупателиToolStripMenuItem.Size = new Size(224, 26);
|
||||
покупателиToolStripMenuItem.Size = new Size(174, 26);
|
||||
покупателиToolStripMenuItem.Text = "Покупатели";
|
||||
покупателиToolStripMenuItem.Click += ПокупателиToolStripMenuItem_Click;
|
||||
//
|
||||
// услугиToolStripMenuItem
|
||||
//
|
||||
услугиToolStripMenuItem.Name = "услугиToolStripMenuItem";
|
||||
услугиToolStripMenuItem.Size = new Size(224, 26);
|
||||
услугиToolStripMenuItem.Size = new Size(174, 26);
|
||||
услугиToolStripMenuItem.Text = "Услуги";
|
||||
услугиToolStripMenuItem.Click += УслугиToolStripMenuItem_Click;
|
||||
//
|
||||
@@ -101,10 +104,35 @@
|
||||
//
|
||||
// отчётToolStripMenuItem
|
||||
//
|
||||
отчётToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { DirectoryReportToolStripMenuItem, PriceReportToolStripMenuItem, ChartReportToolStripMenuItem1 });
|
||||
отчётToolStripMenuItem.Name = "отчётToolStripMenuItem";
|
||||
отчётToolStripMenuItem.Size = new Size(73, 24);
|
||||
отчётToolStripMenuItem.Text = "Отчёты";
|
||||
//
|
||||
// DirectoryReportToolStripMenuItem
|
||||
//
|
||||
DirectoryReportToolStripMenuItem.Name = "DirectoryReportToolStripMenuItem";
|
||||
DirectoryReportToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.W;
|
||||
DirectoryReportToolStripMenuItem.Size = new Size(343, 26);
|
||||
DirectoryReportToolStripMenuItem.Text = "Документ по справочникам";
|
||||
DirectoryReportToolStripMenuItem.Click += DirectoryReportToolStripMenuItem_Click;
|
||||
//
|
||||
// PriceReportToolStripMenuItem
|
||||
//
|
||||
PriceReportToolStripMenuItem.Name = "PriceReportToolStripMenuItem";
|
||||
PriceReportToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.E;
|
||||
PriceReportToolStripMenuItem.Size = new Size(343, 26);
|
||||
PriceReportToolStripMenuItem.Text = "Документ по доходам";
|
||||
PriceReportToolStripMenuItem.Click += PriceReportToolStripMenuItem_Click;
|
||||
//
|
||||
// ChartReportToolStripMenuItem1
|
||||
//
|
||||
ChartReportToolStripMenuItem1.Name = "ChartReportToolStripMenuItem1";
|
||||
ChartReportToolStripMenuItem1.ShortcutKeys = Keys.Control | Keys.P;
|
||||
ChartReportToolStripMenuItem1.Size = new Size(343, 26);
|
||||
ChartReportToolStripMenuItem1.Text = "Документ по сделкам";
|
||||
ChartReportToolStripMenuItem1.Click += ChartReportToolStripMenuItem1_Click;
|
||||
//
|
||||
// FormGeneral
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
@@ -135,5 +163,8 @@
|
||||
private ToolStripMenuItem отчётToolStripMenuItem;
|
||||
private ToolStripMenuItem услугиToolStripMenuItem;
|
||||
private ToolStripMenuItem сделкиToolStripMenuItem;
|
||||
private ToolStripMenuItem DirectoryReportToolStripMenuItem;
|
||||
private ToolStripMenuItem PriceReportToolStripMenuItem;
|
||||
private ToolStripMenuItem ChartReportToolStripMenuItem1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,5 +73,41 @@ namespace RealEstateTransactions
|
||||
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void DirectoryReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_container.Resolve<FormDirectoryReport>().ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void PriceReportToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_container.Resolve<FormPriceReport>().ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void ChartReportToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_container.Resolve<FormChartReport>().ShowDialog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
108
RealEstateTransactions/RealEstateTransactions/Forms/FormChartReport.Designer.cs
generated
Normal file
108
RealEstateTransactions/RealEstateTransactions/Forms/FormChartReport.Designer.cs
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
partial class FormChartReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
buttonSelectFilePath = new Button();
|
||||
labelFilePath = new Label();
|
||||
labelDate = new Label();
|
||||
dateTimePicker = new DateTimePicker();
|
||||
buttonMakeReport = new Button();
|
||||
SuspendLayout();
|
||||
//
|
||||
// buttonSelectFilePath
|
||||
//
|
||||
buttonSelectFilePath.Location = new Point(12, 12);
|
||||
buttonSelectFilePath.Name = "buttonSelectFilePath";
|
||||
buttonSelectFilePath.Size = new Size(94, 29);
|
||||
buttonSelectFilePath.TabIndex = 0;
|
||||
buttonSelectFilePath.Text = "Выбрать";
|
||||
buttonSelectFilePath.UseVisualStyleBackColor = true;
|
||||
buttonSelectFilePath.Click += ButtonSelectFilePath_Click;
|
||||
//
|
||||
// labelFilePath
|
||||
//
|
||||
labelFilePath.AutoSize = true;
|
||||
labelFilePath.Location = new Point(123, 16);
|
||||
labelFilePath.Name = "labelFilePath";
|
||||
labelFilePath.Size = new Size(52, 20);
|
||||
labelFilePath.TabIndex = 1;
|
||||
labelFilePath.Text = "Файл: ";
|
||||
//
|
||||
// labelDate
|
||||
//
|
||||
labelDate.AutoSize = true;
|
||||
labelDate.Location = new Point(12, 67);
|
||||
labelDate.Name = "labelDate";
|
||||
labelDate.Size = new Size(48, 20);
|
||||
labelDate.TabIndex = 2;
|
||||
labelDate.Text = "Дата: ";
|
||||
//
|
||||
// dateTimePicker
|
||||
//
|
||||
dateTimePicker.Location = new Point(86, 62);
|
||||
dateTimePicker.Name = "dateTimePicker";
|
||||
dateTimePicker.Size = new Size(214, 27);
|
||||
dateTimePicker.TabIndex = 1;
|
||||
//
|
||||
// buttonMakeReport
|
||||
//
|
||||
buttonMakeReport.Location = new Point(92, 113);
|
||||
buttonMakeReport.Name = "buttonMakeReport";
|
||||
buttonMakeReport.Size = new Size(136, 29);
|
||||
buttonMakeReport.TabIndex = 2;
|
||||
buttonMakeReport.Text = "сформировать";
|
||||
buttonMakeReport.UseVisualStyleBackColor = true;
|
||||
buttonMakeReport.Click += ButtonMakeReport_Click;
|
||||
//
|
||||
// FormChartReport
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(328, 164);
|
||||
Controls.Add(buttonMakeReport);
|
||||
Controls.Add(dateTimePicker);
|
||||
Controls.Add(labelDate);
|
||||
Controls.Add(labelFilePath);
|
||||
Controls.Add(buttonSelectFilePath);
|
||||
Name = "FormChartReport";
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
Text = "Отчёт о доходе";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Button buttonSelectFilePath;
|
||||
private Label labelFilePath;
|
||||
private Label labelDate;
|
||||
private DateTimePicker dateTimePicker;
|
||||
private Button buttonMakeReport;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using RealEstateTransactions.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Unity;
|
||||
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
public partial class FormChartReport : Form
|
||||
{
|
||||
private string _fileName = string.Empty;
|
||||
|
||||
private readonly IUnityContainer _container;
|
||||
|
||||
public FormChartReport(IUnityContainer container)
|
||||
{
|
||||
InitializeComponent();
|
||||
_container = container ?? throw new ArgumentNullException(nameof(container));
|
||||
}
|
||||
|
||||
private void ButtonSelectFilePath_Click(object sender, EventArgs e)
|
||||
{
|
||||
var sfd = new SaveFileDialog()
|
||||
{
|
||||
Filter = "Pdf Files | *.pdf"
|
||||
};
|
||||
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_fileName = sfd.FileName;
|
||||
labelFilePath.Text = Path.GetFileName(_fileName);
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonMakeReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_fileName))
|
||||
throw new Exception("Отсутствует имя файла для отчета");
|
||||
|
||||
if (_container.Resolve<ChartReport>().CreateChart(_fileName, dateTimePicker.Value))
|
||||
{
|
||||
MessageBox.Show("Документ сформирован", "Формирование документа",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Возникли ошибки при формировании документа.Подробности в логах",
|
||||
"Формирование документа", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Ошибка при создании очета",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
104
RealEstateTransactions/RealEstateTransactions/Forms/FormDirectoryReport.Designer.cs
generated
Normal file
104
RealEstateTransactions/RealEstateTransactions/Forms/FormDirectoryReport.Designer.cs
generated
Normal file
@@ -0,0 +1,104 @@
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
partial class FormDirectoryReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
checkBoxApartment = new CheckBox();
|
||||
checkBoxBuyer = new CheckBox();
|
||||
checkBoxServices = new CheckBox();
|
||||
buttonBuild = new Button();
|
||||
SuspendLayout();
|
||||
//
|
||||
// checkBoxApartment
|
||||
//
|
||||
checkBoxApartment.AutoSize = true;
|
||||
checkBoxApartment.Font = new Font("Segoe UI", 14F);
|
||||
checkBoxApartment.Location = new Point(39, 22);
|
||||
checkBoxApartment.Name = "checkBoxApartment";
|
||||
checkBoxApartment.Size = new Size(144, 36);
|
||||
checkBoxApartment.TabIndex = 0;
|
||||
checkBoxApartment.Text = "Квартиры";
|
||||
checkBoxApartment.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxBuyer
|
||||
//
|
||||
checkBoxBuyer.AutoSize = true;
|
||||
checkBoxBuyer.Font = new Font("Segoe UI", 14F);
|
||||
checkBoxBuyer.Location = new Point(39, 84);
|
||||
checkBoxBuyer.Name = "checkBoxBuyer";
|
||||
checkBoxBuyer.Size = new Size(167, 36);
|
||||
checkBoxBuyer.TabIndex = 1;
|
||||
checkBoxBuyer.Text = "Покупатели";
|
||||
checkBoxBuyer.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxServices
|
||||
//
|
||||
checkBoxServices.AutoSize = true;
|
||||
checkBoxServices.Font = new Font("Segoe UI", 14F);
|
||||
checkBoxServices.Location = new Point(39, 144);
|
||||
checkBoxServices.Name = "checkBoxServices";
|
||||
checkBoxServices.Size = new Size(109, 36);
|
||||
checkBoxServices.TabIndex = 2;
|
||||
checkBoxServices.Text = "Услуги";
|
||||
checkBoxServices.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// buttonBuild
|
||||
//
|
||||
buttonBuild.Font = new Font("Segoe UI", 14F);
|
||||
buttonBuild.Location = new Point(12, 204);
|
||||
buttonBuild.Name = "buttonBuild";
|
||||
buttonBuild.Size = new Size(222, 72);
|
||||
buttonBuild.TabIndex = 3;
|
||||
buttonBuild.Text = "Сформировать";
|
||||
buttonBuild.UseVisualStyleBackColor = true;
|
||||
buttonBuild.Click += ButtonBuild_Click;
|
||||
//
|
||||
// FormDirectoryReport
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(246, 288);
|
||||
Controls.Add(buttonBuild);
|
||||
Controls.Add(checkBoxServices);
|
||||
Controls.Add(checkBoxBuyer);
|
||||
Controls.Add(checkBoxApartment);
|
||||
Name = "FormDirectoryReport";
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
Text = "Выгрузка";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private CheckBox checkBoxApartment;
|
||||
private CheckBox checkBoxBuyer;
|
||||
private CheckBox checkBoxServices;
|
||||
private Button buttonBuild;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using RealEstateTransactions.Reports;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Unity;
|
||||
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
public partial class FormDirectoryReport : Form
|
||||
{
|
||||
private readonly IUnityContainer _container;
|
||||
|
||||
public FormDirectoryReport(IUnityContainer container)
|
||||
{
|
||||
InitializeComponent();
|
||||
_container = container ?? throw new
|
||||
ArgumentNullException(nameof(container));
|
||||
}
|
||||
|
||||
private void ButtonBuild_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!checkBoxApartment.Checked &&
|
||||
!checkBoxBuyer.Checked && !checkBoxServices.Checked)
|
||||
{
|
||||
throw new Exception("Не выбран ни один справочник для выгрузки");
|
||||
}
|
||||
|
||||
var sfd = new SaveFileDialog()
|
||||
{
|
||||
Filter = "Docx Files | *.docx"
|
||||
};
|
||||
|
||||
if (sfd.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
throw new Exception("Не выбран файла для отчета");
|
||||
}
|
||||
|
||||
if (_container.Resolve<DocReport>().CreateDoc(sfd.FileName, checkBoxApartment.Checked,
|
||||
checkBoxBuyer.Checked, checkBoxServices.Checked))
|
||||
{
|
||||
MessageBox.Show("Документ сформирован", "Формирование документа",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Возникли ошибки при формировании документа. Подробности в логах",
|
||||
"Формирование документа", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Ошибка при создании отчета",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
167
RealEstateTransactions/RealEstateTransactions/Forms/FormPriceReport.Designer.cs
generated
Normal file
167
RealEstateTransactions/RealEstateTransactions/Forms/FormPriceReport.Designer.cs
generated
Normal file
@@ -0,0 +1,167 @@
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
partial class FormPriceReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
textBoxFilePath = new TextBox();
|
||||
buttonSelectFilePath = new Button();
|
||||
labelFilePath = new Label();
|
||||
labelApartmentId = new Label();
|
||||
comboBoxApartmentId = new ComboBox();
|
||||
labelDateStart = new Label();
|
||||
labelDateEnd = new Label();
|
||||
dateTimePickerDateStart = new DateTimePicker();
|
||||
dateTimePickerDateEnd = new DateTimePicker();
|
||||
buttonMakeReport = new Button();
|
||||
SuspendLayout();
|
||||
//
|
||||
// textBoxFilePath
|
||||
//
|
||||
textBoxFilePath.BorderStyle = BorderStyle.FixedSingle;
|
||||
textBoxFilePath.Location = new Point(125, 12);
|
||||
textBoxFilePath.Name = "textBoxFilePath";
|
||||
textBoxFilePath.ReadOnly = true;
|
||||
textBoxFilePath.Size = new Size(182, 27);
|
||||
textBoxFilePath.TabIndex = 0;
|
||||
textBoxFilePath.TabStop = false;
|
||||
//
|
||||
// buttonSelectFilePath
|
||||
//
|
||||
buttonSelectFilePath.Location = new Point(313, 10);
|
||||
buttonSelectFilePath.Name = "buttonSelectFilePath";
|
||||
buttonSelectFilePath.Size = new Size(30, 29);
|
||||
buttonSelectFilePath.TabIndex = 0;
|
||||
buttonSelectFilePath.Text = "...";
|
||||
buttonSelectFilePath.UseVisualStyleBackColor = true;
|
||||
buttonSelectFilePath.Click += ButtonSelectFilePath_Click;
|
||||
//
|
||||
// labelFilePath
|
||||
//
|
||||
labelFilePath.AutoSize = true;
|
||||
labelFilePath.Location = new Point(12, 14);
|
||||
labelFilePath.Name = "labelFilePath";
|
||||
labelFilePath.Size = new Size(112, 20);
|
||||
labelFilePath.TabIndex = 1;
|
||||
labelFilePath.Text = "Путь до файла:";
|
||||
//
|
||||
// labelApartmentId
|
||||
//
|
||||
labelApartmentId.AutoSize = true;
|
||||
labelApartmentId.Location = new Point(12, 60);
|
||||
labelApartmentId.Name = "labelApartmentId";
|
||||
labelApartmentId.Size = new Size(78, 20);
|
||||
labelApartmentId.TabIndex = 2;
|
||||
labelApartmentId.Text = "Квартира:";
|
||||
//
|
||||
// comboBoxApartmentId
|
||||
//
|
||||
comboBoxApartmentId.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxApartmentId.FormattingEnabled = true;
|
||||
comboBoxApartmentId.Location = new Point(125, 57);
|
||||
comboBoxApartmentId.Name = "comboBoxApartmentId";
|
||||
comboBoxApartmentId.Size = new Size(218, 28);
|
||||
comboBoxApartmentId.TabIndex = 1;
|
||||
//
|
||||
// labelDateStart
|
||||
//
|
||||
labelDateStart.AutoSize = true;
|
||||
labelDateStart.Location = new Point(12, 112);
|
||||
labelDateStart.Name = "labelDateStart";
|
||||
labelDateStart.Size = new Size(97, 20);
|
||||
labelDateStart.TabIndex = 3;
|
||||
labelDateStart.Text = "Дата начала:";
|
||||
//
|
||||
// labelDateEnd
|
||||
//
|
||||
labelDateEnd.AutoSize = true;
|
||||
labelDateEnd.Location = new Point(12, 157);
|
||||
labelDateEnd.Name = "labelDateEnd";
|
||||
labelDateEnd.Size = new Size(90, 20);
|
||||
labelDateEnd.TabIndex = 4;
|
||||
labelDateEnd.Text = "Дата конца:";
|
||||
//
|
||||
// dateTimePickerDateStart
|
||||
//
|
||||
dateTimePickerDateStart.Location = new Point(125, 107);
|
||||
dateTimePickerDateStart.Name = "dateTimePickerDateStart";
|
||||
dateTimePickerDateStart.Size = new Size(218, 27);
|
||||
dateTimePickerDateStart.TabIndex = 2;
|
||||
//
|
||||
// dateTimePickerDateEnd
|
||||
//
|
||||
dateTimePickerDateEnd.Location = new Point(125, 152);
|
||||
dateTimePickerDateEnd.Name = "dateTimePickerDateEnd";
|
||||
dateTimePickerDateEnd.Size = new Size(218, 27);
|
||||
dateTimePickerDateEnd.TabIndex = 3;
|
||||
//
|
||||
// buttonMakeReport
|
||||
//
|
||||
buttonMakeReport.Location = new Point(125, 201);
|
||||
buttonMakeReport.Name = "buttonMakeReport";
|
||||
buttonMakeReport.Size = new Size(125, 29);
|
||||
buttonMakeReport.TabIndex = 4;
|
||||
buttonMakeReport.Text = "сформировать";
|
||||
buttonMakeReport.UseVisualStyleBackColor = true;
|
||||
buttonMakeReport.Click += ButtonMakeReport_Click;
|
||||
//
|
||||
// FormPriceReport
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(360, 246);
|
||||
Controls.Add(buttonMakeReport);
|
||||
Controls.Add(dateTimePickerDateEnd);
|
||||
Controls.Add(dateTimePickerDateStart);
|
||||
Controls.Add(labelDateEnd);
|
||||
Controls.Add(labelDateStart);
|
||||
Controls.Add(comboBoxApartmentId);
|
||||
Controls.Add(labelApartmentId);
|
||||
Controls.Add(labelFilePath);
|
||||
Controls.Add(buttonSelectFilePath);
|
||||
Controls.Add(textBoxFilePath);
|
||||
Name = "FormPriceReport";
|
||||
StartPosition = FormStartPosition.CenterParent;
|
||||
Text = "Отчёт по доходу";
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TextBox textBoxFilePath;
|
||||
private Button buttonSelectFilePath;
|
||||
private Label labelFilePath;
|
||||
private Label labelApartmentId;
|
||||
private ComboBox comboBoxApartmentId;
|
||||
private Label labelDateStart;
|
||||
private Label labelDateEnd;
|
||||
private DateTimePicker dateTimePickerDateStart;
|
||||
private DateTimePicker dateTimePickerDateEnd;
|
||||
private Button buttonMakeReport;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using RealEstateTransactions.Reports;
|
||||
using RealEstateTransactions.Repositories;
|
||||
using Unity;
|
||||
|
||||
namespace RealEstateTransactions.Forms
|
||||
{
|
||||
public partial class FormPriceReport : Form
|
||||
{
|
||||
private readonly IUnityContainer _container;
|
||||
|
||||
public FormPriceReport(IUnityContainer container, IApartmentRepository repository)
|
||||
{
|
||||
InitializeComponent();
|
||||
_container = container ?? throw new ArgumentNullException(nameof(container));
|
||||
comboBoxApartmentId.DataSource = repository.ReadApartments();
|
||||
comboBoxApartmentId.DisplayMember = "Id";
|
||||
comboBoxApartmentId.ValueMember = "Id";
|
||||
}
|
||||
|
||||
private void ButtonSelectFilePath_Click(object sender, EventArgs e)
|
||||
{
|
||||
var sfd = new SaveFileDialog()
|
||||
{
|
||||
Filter = "Excel Files | *.xlsx"
|
||||
};
|
||||
|
||||
if (sfd.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
textBoxFilePath.Text = sfd.FileName;
|
||||
}
|
||||
|
||||
private void ButtonMakeReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(textBoxFilePath.Text))
|
||||
throw new Exception("Отсутствует имя файла для отчета");
|
||||
|
||||
if (comboBoxApartmentId.SelectedIndex < 0)
|
||||
throw new Exception("Не выбрана квартира");
|
||||
|
||||
if (dateTimePickerDateEnd.Value <= dateTimePickerDateStart.Value)
|
||||
throw new Exception("Дата начала должна быть раньше даты окончания");
|
||||
|
||||
if (_container.Resolve<TableReport>().CreateTable(textBoxFilePath.Text,
|
||||
(int)comboBoxApartmentId.SelectedValue!,
|
||||
dateTimePickerDateStart.Value, dateTimePickerDateEnd.Value))
|
||||
{
|
||||
MessageBox.Show("Документ сформирован", "Формирование документа",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Возникли ошибки при формировании документа.Подробности в логах",
|
||||
"Формирование документа", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Ошибка при создании очета",
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -10,11 +10,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.1.35" />
|
||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Npgsql" Version="9.0.1" />
|
||||
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
|
||||
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using RealEstateTransactions.Repositories;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class ChartReport
|
||||
{
|
||||
private readonly IDealRepository _dealRepository;
|
||||
|
||||
private readonly ILogger<ChartReport> _logger;
|
||||
|
||||
public ChartReport(IDealRepository dealRepository, ILogger<ChartReport> logger)
|
||||
{
|
||||
_dealRepository = dealRepository ?? throw new
|
||||
ArgumentNullException(nameof(dealRepository));
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
public bool CreateChart(string filePath, DateTime dateTime)
|
||||
{
|
||||
try
|
||||
{
|
||||
new PdfBuilder(filePath)
|
||||
.AddHeader("Доход с продажи квартир")
|
||||
.AddPieChart("Проданные квартиры", GetData(dateTime))
|
||||
.Build();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка при формировании документа");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private List<(string Caption, double Value)> GetData(DateTime dateTime)
|
||||
{
|
||||
return _dealRepository
|
||||
.ReadDeals()
|
||||
.Where(x => x.Deal_date.Date == dateTime.Date)
|
||||
.Select(x => (x.Apartment_ID.ToString(), (double)x.Deal_price))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using RealEstateTransactions.Repositories;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class DocReport
|
||||
{
|
||||
private readonly IApartmentRepository _apartmentRepository;
|
||||
private readonly IBuyerRepository _buyerRepository;
|
||||
private readonly IServicesRepository _servicesRepository;
|
||||
private readonly ILogger<DocReport> _logger;
|
||||
|
||||
public DocReport(IApartmentRepository apartmentRepository, IBuyerRepository buyerRepository,
|
||||
IServicesRepository servicesRepository, ILogger<DocReport> logger)
|
||||
{
|
||||
_apartmentRepository = apartmentRepository ?? throw new
|
||||
ArgumentNullException(nameof(apartmentRepository));
|
||||
_buyerRepository = buyerRepository ?? throw new
|
||||
ArgumentNullException(nameof(buyerRepository));
|
||||
_servicesRepository = servicesRepository ?? throw new
|
||||
ArgumentNullException(nameof(servicesRepository));
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
public bool CreateDoc(string filePath, bool includeApartments, bool
|
||||
includeBuyers, bool includeServices)
|
||||
{
|
||||
try
|
||||
{
|
||||
var builder = new WordBuilder(filePath)
|
||||
.AddHeader("Документ со справочниками");
|
||||
if (includeApartments)
|
||||
{
|
||||
builder.AddParagraph("Квартиры")
|
||||
.AddTable([1040, 1040, 1040, 1040, 1040, 1040],
|
||||
GetApartments());
|
||||
}
|
||||
if (includeBuyers)
|
||||
{
|
||||
builder.AddParagraph("Покупатели")
|
||||
.AddTable([2400, 2400, 2400], GetBuyers());
|
||||
}
|
||||
if (includeServices)
|
||||
{
|
||||
builder.AddParagraph("Услуги")
|
||||
.AddTable([3600, 3600], GetServices());
|
||||
}
|
||||
builder.Build();
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка при формировании документа");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private List<string[]> GetApartments()
|
||||
{
|
||||
return [
|
||||
["Номер агенства", "Комнаты", "Площадь", "Цена за кв. метр", "Базовая стоимость", "Желаемая цена продажи"],
|
||||
.. _apartmentRepository
|
||||
.ReadApartments()
|
||||
.Select(x => new string[] { x.Agency_ID.ToString(), x.Form_factor_ID.ToString(),
|
||||
x.Area.ToString(), x.Price_per_SM.ToString(), x.Base_price.ToString(), x.Desired_price.ToString() }),
|
||||
];
|
||||
}
|
||||
private List<string[]> GetBuyers()
|
||||
{
|
||||
return [
|
||||
["ФИО", "Серия паспорта", "Номер паспорта"],
|
||||
.. _buyerRepository
|
||||
.ReadBuyers()
|
||||
.Select(x => new string[] { x.Full_name, x.Passport_series.ToString(),
|
||||
x.Passport_number.ToString() }),
|
||||
];
|
||||
}
|
||||
private List<string[]> GetServices()
|
||||
{
|
||||
return [
|
||||
["Название", "Цена"],
|
||||
.. _servicesRepository
|
||||
.ReadServices()
|
||||
.Select(x => new string[] { x.Name, x.Price.ToString() }),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class ExcelBuilder
|
||||
{
|
||||
private readonly string _filePath;
|
||||
|
||||
private readonly SheetData _sheetData;
|
||||
|
||||
private readonly MergeCells _mergeCells;
|
||||
|
||||
private readonly Columns _columns;
|
||||
|
||||
private uint _rowIndex = 0;
|
||||
|
||||
public ExcelBuilder(string filePath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filePath))
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
|
||||
if (File.Exists(filePath)) File.Delete(filePath);
|
||||
|
||||
_filePath = filePath;
|
||||
_sheetData = new SheetData();
|
||||
_mergeCells = new MergeCells();
|
||||
_columns = new Columns();
|
||||
_rowIndex = 1;
|
||||
}
|
||||
|
||||
public ExcelBuilder AddHeader(string header, int startIndex, int count)
|
||||
{
|
||||
CreateCell(startIndex, _rowIndex, header, StyleIndex.BoldTextWithoutBobder);
|
||||
for (int i = startIndex + 1; i < startIndex + count; ++i)
|
||||
CreateCell(i, _rowIndex, "", StyleIndex.BoldTextWithoutBobder);
|
||||
|
||||
_mergeCells.Append(new MergeCell()
|
||||
{
|
||||
Reference = new StringValue($"{GetExcelColumnName(startIndex)}{_rowIndex}:" +
|
||||
$"{GetExcelColumnName(startIndex + count - 1)}{_rowIndex}")
|
||||
});
|
||||
_rowIndex++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExcelBuilder AddParagraph(string text, int columnIndex)
|
||||
{
|
||||
CreateCell(columnIndex, _rowIndex++, text, StyleIndex.SimpleTextWithoutBorder);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ExcelBuilder AddTable(int[] columnsWidths, List<string[]> data)
|
||||
{
|
||||
if (columnsWidths == null || columnsWidths.Length == 0)
|
||||
throw new ArgumentNullException(nameof(columnsWidths));
|
||||
|
||||
if (data == null || data.Count == 0)
|
||||
throw new ArgumentNullException(nameof(data));
|
||||
|
||||
if (data.Any(x => x.Length != columnsWidths.Length))
|
||||
throw new InvalidOperationException("widths.Length != data.Length");
|
||||
|
||||
uint counter = 1;
|
||||
int coef = 2;
|
||||
_columns.Append(columnsWidths.Select(x => new Column
|
||||
{
|
||||
Min = counter,
|
||||
Max = counter++,
|
||||
Width = x * coef,
|
||||
CustomWidth = true
|
||||
}));
|
||||
|
||||
for (var j = 0; j < data.First().Length; ++j)
|
||||
CreateCell(j, _rowIndex, data.First()[j], StyleIndex.BoldTextWithBorder);
|
||||
|
||||
_rowIndex++;
|
||||
|
||||
for (var i = 1; i < data.Count - 1; ++i)
|
||||
{
|
||||
for (var j = 0; j < data[i].Length; ++j)
|
||||
{
|
||||
CreateCell(j, _rowIndex, data[i][j], StyleIndex.SimpleTextWithBorder);
|
||||
}
|
||||
_rowIndex++;
|
||||
}
|
||||
|
||||
for (var j = 0; j < data.Last().Length; ++j)
|
||||
{
|
||||
CreateCell(j, _rowIndex, data.Last()[j], StyleIndex.BoldTextWithBorder);
|
||||
}
|
||||
|
||||
_rowIndex++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Build()
|
||||
{
|
||||
using var spreadsheetDocument = SpreadsheetDocument.Create(_filePath,
|
||||
SpreadsheetDocumentType.Workbook);
|
||||
var workbookpart = spreadsheetDocument.AddWorkbookPart();
|
||||
GenerateStyle(workbookpart);
|
||||
workbookpart.Workbook = new Workbook();
|
||||
var worksheetPart = workbookpart.AddNewPart<WorksheetPart>();
|
||||
worksheetPart.Worksheet = new Worksheet();
|
||||
if (_columns.HasChildren) worksheetPart.Worksheet.Append(_columns);
|
||||
worksheetPart.Worksheet.Append(_sheetData);
|
||||
var sheets = spreadsheetDocument.WorkbookPart!.Workbook.AppendChild(new Sheets());
|
||||
var sheet = new Sheet()
|
||||
{
|
||||
Id = spreadsheetDocument.WorkbookPart.GetIdOfPart(worksheetPart),
|
||||
SheetId = 1,
|
||||
Name = "Лист 1"
|
||||
};
|
||||
|
||||
sheets.Append(sheet);
|
||||
if (_mergeCells.HasChildren)
|
||||
{
|
||||
worksheetPart.Worksheet.InsertAfter(_mergeCells,
|
||||
worksheetPart.Worksheet.Elements<SheetData>().First());
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateStyle(WorkbookPart workbookPart)
|
||||
{
|
||||
var workbookStylesPart = workbookPart.AddNewPart<WorkbookStylesPart>();
|
||||
workbookStylesPart.Stylesheet = new Stylesheet();
|
||||
var fonts = new Fonts()
|
||||
{
|
||||
Count = 2,
|
||||
KnownFonts = BooleanValue.FromBoolean(true)
|
||||
};
|
||||
|
||||
fonts.Append(new DocumentFormat.OpenXml.Spreadsheet.Font
|
||||
{
|
||||
FontSize = new FontSize() { Val = 11 },
|
||||
FontName = new FontName() { Val = "Calibri" },
|
||||
FontFamilyNumbering = new FontFamilyNumbering() { Val = 2 },
|
||||
FontScheme = new FontScheme()
|
||||
{
|
||||
Val = new EnumValue<FontSchemeValues>(FontSchemeValues.Minor)
|
||||
}
|
||||
});
|
||||
|
||||
fonts.Append(new DocumentFormat.OpenXml.Spreadsheet.Font
|
||||
{
|
||||
FontSize = new FontSize() { Val = 11 },
|
||||
FontName = new FontName() { Val = "Calibri" },
|
||||
FontFamilyNumbering = new FontFamilyNumbering() { Val = 2 },
|
||||
FontScheme = new FontScheme()
|
||||
{
|
||||
Val = new EnumValue<FontSchemeValues>(FontSchemeValues.Minor)
|
||||
},
|
||||
Bold = new Bold()
|
||||
});
|
||||
workbookStylesPart.Stylesheet.Append(fonts);
|
||||
|
||||
var fills = new Fills() { Count = 1 };
|
||||
fills.Append(new Fill
|
||||
{
|
||||
PatternFill = new PatternFill()
|
||||
{
|
||||
PatternType = new EnumValue<PatternValues>(PatternValues.None)
|
||||
}
|
||||
});
|
||||
workbookStylesPart.Stylesheet.Append(fills);
|
||||
|
||||
var borders = new Borders() { Count = 2 };
|
||||
borders.Append(new Border
|
||||
{
|
||||
LeftBorder = new LeftBorder(),
|
||||
RightBorder = new RightBorder(),
|
||||
TopBorder = new TopBorder(),
|
||||
BottomBorder = new BottomBorder(),
|
||||
DiagonalBorder = new DiagonalBorder()
|
||||
});
|
||||
|
||||
borders.Append(new Border()
|
||||
{
|
||||
LeftBorder = new LeftBorder() { Style = BorderStyleValues.Thin },
|
||||
RightBorder = new RightBorder() { Style = BorderStyleValues.Thin },
|
||||
TopBorder = new TopBorder() { Style = BorderStyleValues.Thin },
|
||||
BottomBorder = new BottomBorder() { Style = BorderStyleValues.Thin },
|
||||
DiagonalBorder = new DiagonalBorder()
|
||||
});
|
||||
workbookStylesPart.Stylesheet.Append(borders);
|
||||
|
||||
var cellFormats = new CellFormats() { Count = 4 };
|
||||
cellFormats.Append(new CellFormat
|
||||
{
|
||||
NumberFormatId = 0,
|
||||
FormatId = 0,
|
||||
FontId = 0,
|
||||
BorderId = 0,
|
||||
FillId = 0,
|
||||
Alignment = new Alignment()
|
||||
{
|
||||
Horizontal = HorizontalAlignmentValues.Left,
|
||||
Vertical = VerticalAlignmentValues.Center,
|
||||
WrapText = true
|
||||
}
|
||||
});
|
||||
|
||||
cellFormats.Append(new CellFormat
|
||||
{
|
||||
NumberFormatId = 0,
|
||||
FormatId = 0,
|
||||
FontId = 1,
|
||||
BorderId = 0,
|
||||
FillId = 0,
|
||||
Alignment = new Alignment()
|
||||
{
|
||||
Horizontal = HorizontalAlignmentValues.Left,
|
||||
Vertical = VerticalAlignmentValues.Center,
|
||||
WrapText = true
|
||||
}
|
||||
});
|
||||
|
||||
cellFormats.Append(new CellFormat
|
||||
{
|
||||
NumberFormatId = 0,
|
||||
FormatId = 0,
|
||||
FontId = 1,
|
||||
BorderId = 1,
|
||||
FillId = 0,
|
||||
Alignment = new Alignment()
|
||||
{
|
||||
Horizontal = HorizontalAlignmentValues.Left,
|
||||
Vertical = VerticalAlignmentValues.Center,
|
||||
WrapText = true
|
||||
}
|
||||
});
|
||||
|
||||
cellFormats.Append(new CellFormat
|
||||
{
|
||||
NumberFormatId = 0,
|
||||
FormatId = 0,
|
||||
FontId = 0,
|
||||
BorderId = 1,
|
||||
FillId = 0,
|
||||
Alignment = new Alignment()
|
||||
{
|
||||
Horizontal = HorizontalAlignmentValues.Left,
|
||||
Vertical = VerticalAlignmentValues.Center,
|
||||
WrapText = true
|
||||
}
|
||||
});
|
||||
workbookStylesPart.Stylesheet.Append(cellFormats);
|
||||
}
|
||||
|
||||
private enum StyleIndex
|
||||
{
|
||||
SimpleTextWithoutBorder = 0,
|
||||
BoldTextWithoutBobder = 1,
|
||||
BoldTextWithBorder = 2,
|
||||
SimpleTextWithBorder = 3
|
||||
}
|
||||
|
||||
private void CreateCell(int columnIndex, uint rowIndex, string text,
|
||||
StyleIndex styleIndex)
|
||||
{
|
||||
var columnName = GetExcelColumnName(columnIndex);
|
||||
var cellReference = columnName + rowIndex;
|
||||
var row = _sheetData.Elements<Row>().FirstOrDefault(r =>
|
||||
r.RowIndex! == rowIndex);
|
||||
|
||||
if (row == null)
|
||||
{
|
||||
row = new Row() { RowIndex = rowIndex };
|
||||
_sheetData.Append(row);
|
||||
}
|
||||
|
||||
var newCell = row.Elements<Cell>()
|
||||
.FirstOrDefault(c => c.CellReference != null &&
|
||||
c.CellReference.Value == columnName + rowIndex);
|
||||
|
||||
if (newCell == null)
|
||||
{
|
||||
Cell? refCell = null;
|
||||
foreach (Cell cell in row.Elements<Cell>())
|
||||
{
|
||||
if (cell.CellReference?.Value != null &&
|
||||
cell.CellReference.Value.Length == cellReference.Length)
|
||||
{
|
||||
if (string.Compare(cell.CellReference.Value,
|
||||
cellReference, true) > 0)
|
||||
{
|
||||
refCell = cell;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
newCell = new Cell() { CellReference = cellReference };
|
||||
row.InsertBefore(newCell, refCell);
|
||||
}
|
||||
|
||||
newCell.CellValue = new CellValue(text);
|
||||
newCell.DataType = CellValues.String;
|
||||
newCell.StyleIndex = (uint)styleIndex;
|
||||
}
|
||||
|
||||
private static string GetExcelColumnName(int columnNumber)
|
||||
{
|
||||
columnNumber += 1;
|
||||
int dividend = columnNumber;
|
||||
string columnName = string.Empty;
|
||||
int modulo;
|
||||
|
||||
while (dividend > 0)
|
||||
{
|
||||
modulo = (dividend - 1) % 26;
|
||||
columnName = Convert.ToChar(65 + modulo).ToString() + columnName;
|
||||
dividend = (dividend - modulo) / 26;
|
||||
}
|
||||
|
||||
return columnName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using MigraDoc.DocumentObjectModel;
|
||||
using MigraDoc.DocumentObjectModel.Shapes.Charts;
|
||||
using MigraDoc.Rendering;
|
||||
using System.Text;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class PdfBuilder
|
||||
{
|
||||
private readonly string _filePath;
|
||||
|
||||
private readonly Document _document;
|
||||
|
||||
public PdfBuilder(string filePath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filePath))
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
|
||||
if (File.Exists(filePath)) File.Delete(filePath);
|
||||
|
||||
_filePath = filePath;
|
||||
_document = new Document();
|
||||
DefineStyles();
|
||||
}
|
||||
|
||||
public PdfBuilder AddHeader(string header)
|
||||
{
|
||||
_document.AddSection().AddParagraph(header, "NormalBold");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public PdfBuilder AddPieChart(string title, List<(string Caption, double
|
||||
Value)> data)
|
||||
{
|
||||
if (data == null || data.Count == 0) return this;
|
||||
|
||||
var chart = new Chart(ChartType.Pie2D);
|
||||
var series = chart.SeriesCollection.AddSeries();
|
||||
series.Add(data.Select(x => x.Value).ToArray());
|
||||
var xseries = chart.XValues.AddXSeries();
|
||||
xseries.Add(data.Select(x => x.Caption).ToArray());
|
||||
chart.DataLabel.Type = DataLabelType.Percent;
|
||||
chart.DataLabel.Position = DataLabelPosition.OutsideEnd;
|
||||
chart.Width = Unit.FromCentimeter(16);
|
||||
chart.Height = Unit.FromCentimeter(12);
|
||||
chart.TopArea.AddParagraph(title);
|
||||
chart.XAxis.MajorTickMark = TickMarkType.Outside;
|
||||
chart.YAxis.MajorTickMark = TickMarkType.Outside;
|
||||
chart.YAxis.HasMajorGridlines = true;
|
||||
chart.PlotArea.LineFormat.Width = 1;
|
||||
chart.PlotArea.LineFormat.Visible = true;
|
||||
chart.TopArea.AddLegend();
|
||||
_document.LastSection.Add(chart);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Build()
|
||||
{
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
var renderer = new PdfDocumentRenderer(true)
|
||||
{
|
||||
Document = _document
|
||||
};
|
||||
|
||||
renderer.RenderDocument();
|
||||
renderer.PdfDocument.Save(_filePath);
|
||||
}
|
||||
|
||||
private void DefineStyles()
|
||||
{
|
||||
var headerStyle = _document.Styles.AddStyle("Normal Bold", "Normal");
|
||||
headerStyle.Font.Bold = true;
|
||||
headerStyle.Font.Size = 14;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using RealEstateTransactions.Repositories;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class TableReport
|
||||
{
|
||||
private readonly IDealRepository _dealRepository;
|
||||
|
||||
private readonly IPreSalesServicesRepository _preSalesServicesRepository;
|
||||
|
||||
private readonly ILogger<TableReport> _logger;
|
||||
|
||||
internal static readonly string[] item = ["Сделка", "Дата", "Доход от сделки", "Доход от допродажных услуг"];
|
||||
|
||||
public TableReport(IDealRepository dealRepository,
|
||||
IPreSalesServicesRepository preSalesServicesRepository, ILogger<TableReport> logger)
|
||||
{
|
||||
_dealRepository = dealRepository ?? throw new
|
||||
ArgumentNullException(nameof(dealRepository));
|
||||
_preSalesServicesRepository = preSalesServicesRepository ?? throw new
|
||||
ArgumentNullException(nameof(preSalesServicesRepository));
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
}
|
||||
|
||||
public bool CreateTable(string filePath, int apartmentId, DateTime startDate,
|
||||
DateTime endDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
new ExcelBuilder(filePath)
|
||||
.AddHeader("Сводка по доходу от продажи квартиры", 0, 4)
|
||||
.AddParagraph("за период", 0)
|
||||
.AddTable([10, 10, 10, 15], GetData(apartmentId, startDate,
|
||||
endDate))
|
||||
.Build();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка при формировании документа");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private List<string[]> GetData(int apartmentId, DateTime startDate, DateTime
|
||||
endDate)
|
||||
{
|
||||
var data = _dealRepository
|
||||
.ReadDeals()
|
||||
.Where(x => x.Deal_date >= startDate && x.Deal_date <= endDate &&
|
||||
x.Apartment_ID == apartmentId)
|
||||
.Select(x => new {
|
||||
DealId = (int?)x.Id, Date = (DateTime?)x.Deal_date, DealPrice = (float?)x.Deal_price, ServicesPrice = (float?)null
|
||||
})
|
||||
.Union(
|
||||
_preSalesServicesRepository
|
||||
.ReadPreSalesServices()
|
||||
.Where(x => x.Apartment_ID == apartmentId)
|
||||
.Select(x => new {
|
||||
DealId = (int?)null, Date = (DateTime?)null, DealPrice = (float?)null, ServicesPrice = (float?)x.Cost
|
||||
}))
|
||||
.OrderBy(x => x.Date);
|
||||
|
||||
return
|
||||
new List<string[]>() { item }
|
||||
.Union(
|
||||
data
|
||||
.Select(x => new string[] {
|
||||
x.DealId?.ToString() ?? string.Empty, x.Date?.ToString() ?? string.Empty,
|
||||
x.DealPrice?.ToString() ?? string.Empty, x.ServicesPrice?.ToString() ?? string.Empty}))
|
||||
.Union(
|
||||
[["Всего", "", data.Sum(x => x.DealPrice ?? 0).ToString(),
|
||||
data.Sum(x => x.ServicesPrice ?? 0).ToString()]])
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using DocumentFormat.OpenXml;
|
||||
using DocumentFormat.OpenXml.Packaging;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
|
||||
namespace RealEstateTransactions.Reports
|
||||
{
|
||||
public class WordBuilder
|
||||
{
|
||||
private readonly string _filePath;
|
||||
|
||||
private readonly Document _document;
|
||||
|
||||
private readonly Body _body;
|
||||
|
||||
public WordBuilder(string filePath)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filePath))
|
||||
throw new ArgumentNullException(nameof(filePath));
|
||||
|
||||
if (File.Exists(filePath)) File.Delete(filePath);
|
||||
|
||||
_filePath = filePath;
|
||||
_document = new Document();
|
||||
_body = _document.AppendChild(new Body());
|
||||
}
|
||||
|
||||
public WordBuilder AddHeader(string header)
|
||||
{
|
||||
var paragraph = _body.AppendChild(new Paragraph());
|
||||
var run = paragraph.AppendChild(new Run(new RunProperties(new Bold())));
|
||||
run.AppendChild(new Text(header));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public WordBuilder AddParagraph(string text)
|
||||
{
|
||||
var paragraph = _body.AppendChild(new Paragraph());
|
||||
var run = paragraph.AppendChild(new Run());
|
||||
run.AppendChild(new Text(text));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public WordBuilder AddTable(int[] widths, List<string[]> data)
|
||||
{
|
||||
if (widths == null || widths.Length == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(widths));
|
||||
}
|
||||
if (data == null || data.Count == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(data));
|
||||
}
|
||||
if (data.Any(x => x.Length != widths.Length))
|
||||
{
|
||||
throw new InvalidOperationException("widths.Length != data.Length");
|
||||
}
|
||||
|
||||
var table = new Table();
|
||||
table.AppendChild(new TableProperties(
|
||||
new TableBorders(
|
||||
new TopBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
},
|
||||
new BottomBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
},
|
||||
new LeftBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
},
|
||||
new RightBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
},
|
||||
new InsideHorizontalBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
},
|
||||
new InsideVerticalBorder()
|
||||
{
|
||||
Val = new
|
||||
EnumValue<BorderValues>(BorderValues.Single), Size = 12
|
||||
})
|
||||
));
|
||||
|
||||
var tr = new TableRow();
|
||||
for (var j = 0; j < widths.Length; ++j)
|
||||
{
|
||||
tr.Append(new TableCell(
|
||||
new TableCellProperties(new TableCellWidth()
|
||||
{
|
||||
Width =
|
||||
widths[j].ToString()
|
||||
}),
|
||||
new Paragraph(new Run(new RunProperties(new Bold()), new
|
||||
Text(data.First()[j])))));
|
||||
}
|
||||
table.Append(tr);
|
||||
|
||||
table.Append(data.Skip(1).Select(x =>
|
||||
new TableRow(x.Select(y => new TableCell(new Paragraph(new
|
||||
Run(new Text(y))))))));
|
||||
|
||||
_body.Append(table);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public void Build()
|
||||
{
|
||||
using var wordDocument = WordprocessingDocument.Create(_filePath,
|
||||
WordprocessingDocumentType.Document);
|
||||
var mainPart = wordDocument.AddMainDocumentPart();
|
||||
mainPart.Document = _document;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user