готово всё
This commit is contained in:
parent
66238fe6f2
commit
48cbed7bab
@ -64,8 +64,7 @@ namespace FishFactory.Forms
|
||||
{
|
||||
if (MessageBox.Show("Удалить запись?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
int id =
|
||||
Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value);
|
||||
_logger.LogInformation("Удаление компонента");
|
||||
try
|
||||
{
|
||||
|
@ -38,15 +38,12 @@ namespace FishFactory.Forms
|
||||
|
||||
private void buttonAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
var service = Program.ServiceProvider?.GetService(typeof(FormImplementer));
|
||||
if (service is FormImplementer form)
|
||||
{
|
||||
var form = DependencyManager.Instance.Resolve<FormImplementer>();
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonUpd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ namespace FishFactory.Forms
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка загрузки заказов");
|
||||
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
private void компонентыToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1,8 +1,6 @@
|
||||
using FishFactory.Forms;
|
||||
using FishFactoryContracts.BusinessLogicsContracts;
|
||||
using FishFactoryBusinessLogic.BusinessLogic;
|
||||
using FishFactoryContracts.StoragesContracts;
|
||||
using FishFactoryDatabaseImplement.Implements;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog.Extensions.Logging;
|
||||
|
@ -9,7 +9,7 @@ namespace FishFactoryContracts.ViewModels
|
||||
public int Id { get; set; }
|
||||
[Column(title: "Название компонента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string ComponentName { get; set; } = string.Empty;
|
||||
[Column(title: "Цена", width: 150)]
|
||||
[Column(title: "Цена", width: 130)]
|
||||
public double Cost { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
using FishFactoryContracts.Attributes;
|
||||
using FishFactoryDataModel.Enums;
|
||||
using System.ComponentModel;
|
||||
using FishFactoryDataModel.Models;
|
||||
|
||||
namespace FishFactoryContracts.ViewModels
|
||||
{
|
||||
public class OrderViewModel
|
||||
public class OrderViewModel : IOrderModel
|
||||
{
|
||||
[DisplayName("Номер")]
|
||||
[Column(title: "Номер", width: 30)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(visible: false)]
|
||||
|
@ -22,7 +22,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\..\ImplementationExtensions\*.dll"" />
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\ImplementationExtensions\*.dll"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -3,7 +3,7 @@ using FishFactoryContracts.StoragesContracts;
|
||||
|
||||
namespace FishFactoryDatabaseImplement.Implements
|
||||
{
|
||||
public class ImplementationExtension
|
||||
public class ImplementationExtension : IImplementationExtension
|
||||
{
|
||||
public int Priority => 2;
|
||||
|
||||
|
@ -1,14 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace FishFactoryDatabaseImplement.Models
|
||||
{
|
||||
[DataContract]
|
||||
public class CannedComponent
|
||||
{
|
||||
[DataMember]
|
||||
public int Id { get; set; }
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int CannedId { get; set; }
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int ComponentId { get; set; }
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int Count { get; set; }
|
||||
public virtual Component Component { get; set; } = new();
|
||||
|
@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\..\ImplementationExtensions\*.dll"" />
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\ImplementationExtensions\*.dll"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
@ -5,7 +5,7 @@ namespace FishFactoryFileImplement.Implements
|
||||
{
|
||||
public class ImplementationExtension : IImplementationExtension
|
||||
{
|
||||
public int Priority => 1;
|
||||
public int Priority => 0;
|
||||
|
||||
public void RegisterServices()
|
||||
{
|
||||
|
@ -13,6 +13,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\..\ImplementationExtensions\*.dll"" />
|
||||
<Exec Command="copy /Y "$(TargetDir)*.dll" "$(SolutionDir)\ImplementationExtensions\*.dll"" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
@ -12,7 +12,7 @@
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5284",
|
||||
"environmentVariables": {
|
||||
@ -22,7 +22,7 @@
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7012;http://localhost:5284",
|
||||
"environmentVariables": {
|
||||
|
Loading…
Reference in New Issue
Block a user