готово всё
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)
|
||||
{
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LoadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
@ -106,7 +106,7 @@ namespace FishFactoryBusinessLogic.BusinessLogic
|
||||
throw new ArgumentNullException(nameof(element));
|
||||
}
|
||||
|
||||
model.CannedId = element.CannedId;
|
||||
model.CannedId = element.CannedId;
|
||||
model.ClientId = element.ClientId;
|
||||
model.DateCreate = element.DateCreate;
|
||||
model.DateImplement = element.DateImplement;
|
||||
|
@ -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,13 +1,13 @@
|
||||
using FishFactoryContracts.Attributes;
|
||||
using FishFactoryDataModel.Enums;
|
||||
using System.ComponentModel;
|
||||
using FishFactoryDataModel.Models;
|
||||
|
||||
namespace FishFactoryContracts.ViewModels
|
||||
{
|
||||
public class OrderViewModel
|
||||
public class OrderViewModel : IOrderModel
|
||||
{
|
||||
[DisplayName("Номер")]
|
||||
public int Id { get; set; }
|
||||
[Column(title: "Номер", width: 30)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(visible: false)]
|
||||
public int ClientId { get; set; }
|
||||
|
@ -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,15 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace FishFactoryDatabaseImplement.Models
|
||||
{
|
||||
public class CannedComponent
|
||||
[DataContract]
|
||||
public class CannedComponent
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
[DataMember]
|
||||
public int Id { get; set; }
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int CannedId { get; set; }
|
||||
[Required]
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int ComponentId { get; set; }
|
||||
[Required]
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int Count { get; set; }
|
||||
public virtual Component Component { get; set; } = new();
|
||||
public virtual Canned Canned { 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