2lab done

This commit is contained in:
platoff aeeee 2024-03-27 00:02:22 +04:00
parent b4d7679154
commit b618ea277e
13 changed files with 742 additions and 59 deletions

View File

@ -11,7 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyBusinessLo
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyListImplement", "FurnitureAssemblyListImplement\FurnitureAssemblyListImplement.csproj", "{332092CD-AA0D-475A-88A2-2E887E29E56A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyListImplement", "FurnitureAssemblyListImplement\FurnitureAssemblyListImplement.csproj", "{332092CD-AA0D-475A-88A2-2E887E29E56A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssemblyView", "FurnitureAssemblyView\FurnitureAssemblyView.csproj", "{77944C5A-53FC-437B-A563-E7C09C769859}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureAssemblyView", "FurnitureAssemblyView\FurnitureAssemblyView.csproj", "{77944C5A-53FC-437B-A563-E7C09C769859}"
ProjectSection(ProjectDependencies) = postProject
{8DA61C13-D732-4AA0-8D0A-3569022681D2} = {8DA61C13-D732-4AA0-8D0A-3569022681D2}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureAssemblyFileImplement", "FurnitureAssemblyFileImplement\FurnitureAssemblyFileImplement.csproj", "{8DA61C13-D732-4AA0-8D0A-3569022681D2}"
ProjectSection(ProjectDependencies) = postProject
{7A1F9F2F-DDA5-4C97-8FAA-149D5372365D} = {7A1F9F2F-DDA5-4C97-8FAA-149D5372365D}
{A5F526DF-C1CD-4FCA-87E6-BDB447FF959C} = {A5F526DF-C1CD-4FCA-87E6-BDB447FF959C}
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -39,6 +48,10 @@ Global
{77944C5A-53FC-437B-A563-E7C09C769859}.Debug|Any CPU.Build.0 = Debug|Any CPU {77944C5A-53FC-437B-A563-E7C09C769859}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77944C5A-53FC-437B-A563-E7C09C769859}.Release|Any CPU.ActiveCfg = Release|Any CPU {77944C5A-53FC-437B-A563-E7C09C769859}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77944C5A-53FC-437B-A563-E7C09C769859}.Release|Any CPU.Build.0 = Release|Any CPU {77944C5A-53FC-437B-A563-E7C09C769859}.Release|Any CPU.Build.0 = Release|Any CPU
{8DA61C13-D732-4AA0-8D0A-3569022681D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DA61C13-D732-4AA0-8D0A-3569022681D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DA61C13-D732-4AA0-8D0A-3569022681D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DA61C13-D732-4AA0-8D0A-3569022681D2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,69 @@
using FurnitureAssemblyFileImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace FurnitureAssemblyFileImplement
{
internal class DataFileSingleton
{
private static DataFileSingleton? instance;
private readonly string WorkPieceFileName = "WorkPiece.xml";
private readonly string OrderFileName = "Order.xml";
private readonly string FurnitureFileName = "Furniture.xml";
public List<WorkPiece> WorkPieces { get; private set; }
public List<Order> Orders { get; private set; }
public List<Furniture> Furnitures { get; private set; }
public static DataFileSingleton GetInstance()
{
if (instance == null)
{
instance = new DataFileSingleton();
}
return instance;
}
public void SaveWorkPieces() => SaveData(WorkPieces, WorkPieceFileName, "WorkPieces", x => x.GetXElement);
public void SaveFurnitures() => SaveData(Furnitures, FurnitureFileName, "Furnitures", x => x.GetXElement);
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement);
private DataFileSingleton()
{
WorkPieces = LoadData(WorkPieceFileName, "WorkPiece", x => WorkPiece.Create(x)!)!;
Furnitures = LoadData(FurnitureFileName, "Furniture", x => Furniture.Create(x)!)!;
Orders = LoadData(OrderFileName, "Order", x => Order.Create(x)!)!;
}
private static List<T>? LoadData<T>(string filename, string xmlNodeName, Func<XElement, T> selectFunction)
{
if (File.Exists(filename))
{
return XDocument.Load(filename)?.Root?.Elements(xmlNodeName)?.Select(selectFunction)?.ToList();
}
return new List<T>();
}
private static void SaveData<T>(List<T> data, string filename, string xmlNodeName, Func<T, XElement> selectFunction)
{
if (data != null)
{
new XDocument(new XElement(xmlNodeName, data.Select(selectFunction).ToArray())).Save(filename);
}
}
}
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FurnitureAssemblyContracts\FurnitureAssemblyContracts.csproj" />
<ProjectReference Include="..\FurnitureAssemblyDataModels\FurnitureAssemblyDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,96 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.SearchModels;
using FurnitureAssemblyContracts.StoragesContracts;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyFileImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FurnitureAssemblyFileImplement.Implements
{
public class FurnitureStorage : IFurnitureStorage
{
private readonly DataFileSingleton source;
public FurnitureStorage()
{
source = DataFileSingleton.GetInstance();
}
public List<FurnitureViewModel> GetFullList()
{
return source.Furnitures.Select(x => x.GetViewModel).ToList();
}
public List<FurnitureViewModel> GetFilteredList(FurnitureSearchModel model)
{
if (string.IsNullOrEmpty(model.FurnitureName))
{
return new();
}
return source.Furnitures.Where(x => x.FurnitureName.Contains(model.FurnitureName)).Select(x => x.GetViewModel).ToList();
}
public FurnitureViewModel? GetElement(FurnitureSearchModel model)
{
if (string.IsNullOrEmpty(model.FurnitureName) && !model.Id.HasValue)
{
return null;
}
return source.Furnitures.FirstOrDefault(x => (!string.IsNullOrEmpty(model.FurnitureName) && x.FurnitureName == model.FurnitureName)
|| (model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
}
public FurnitureViewModel? Insert(FurnitureBindingModel model)
{
model.Id = source.Furnitures.Count > 0 ? source.Furnitures.Max(x => x.Id) + 1 : 1;
var newFurniture = Furniture.Create(model);
if (newFurniture == null)
{
return null;
}
source.Furnitures.Add(newFurniture);
source.SaveFurnitures();
return newFurniture.GetViewModel;
}
public FurnitureViewModel? Update(FurnitureBindingModel model)
{
var furniture = source.Furnitures.FirstOrDefault(x => x.Id == model.Id);
if (furniture == null)
{
return null;
}
furniture.Update(model);
source.SaveFurnitures();
return furniture.GetViewModel;
}
public FurnitureViewModel? Delete(FurnitureBindingModel model)
{
var element = source.Furnitures.FirstOrDefault(x => x.Id == model.Id);
if (element != null)
{
source.Furnitures.Remove(element);
source.SaveFurnitures();
return element.GetViewModel;
}
return null;
}
}
}

View File

@ -0,0 +1,110 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.SearchModels;
using FurnitureAssemblyContracts.StoragesContracts;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyFileImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FurnitureAssemblyFileImplement.Implements
{
public class OrderStorage : IOrderStorage
{
private readonly DataFileSingleton source;
public OrderStorage()
{
source = DataFileSingleton.GetInstance();
}
public List<OrderViewModel> GetFullList()
{
return source.Orders.Select(x => GetViewModel(x)).ToList();
}
public List<OrderViewModel> GetFilteredList(OrderSearchModel model)
{
if (!model.Id.HasValue)
{
return new();
}
return source.Orders.Where(x => x.Id == model.Id).Select(x => GetViewModel(x)).ToList();
}
public OrderViewModel? GetElement(OrderSearchModel model)
{
if (!model.Id.HasValue)
{
return null;
}
return source.Orders.FirstOrDefault(x => (model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
}
// Для загрузки названий изделия в заказе
private OrderViewModel GetViewModel(Order order)
{
var viewModel = order.GetViewModel;
var furniture = source.Furnitures.FirstOrDefault(x => x.Id == order.FurnitureId);
if (furniture != null)
{
viewModel.FurnitureName = furniture.FurnitureName;
}
return viewModel;
}
public OrderViewModel? Insert(OrderBindingModel model)
{
model.Id = source.Orders.Count > 0 ? source.Orders.Max(x => x.Id) + 1 : 1;
var newOrder = Order.Create(model);
if (newOrder == null)
{
return null;
}
source.Orders.Add(newOrder);
source.SaveOrders();
return GetViewModel(newOrder);
}
public OrderViewModel? Update(OrderBindingModel model)
{
var order = source.Orders.FirstOrDefault(x => x.Id == model.Id);
if (order == null)
{
return null;
}
order.Update(model);
source.SaveOrders();
return GetViewModel(order);
}
public OrderViewModel? Delete(OrderBindingModel model)
{
var element = source.Orders.FirstOrDefault(x => x.Id == model.Id);
if (element != null)
{
source.Orders.Remove(element);
source.SaveOrders();
return GetViewModel(element);
}
return null;
}
}
}

View File

@ -0,0 +1,96 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.SearchModels;
using FurnitureAssemblyContracts.StoragesContracts;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyFileImplement.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FurnitureAssemblyFileImplement.Implements
{
public class WorkPieceStorage : IWorkPieceStorage
{
private readonly DataFileSingleton source;
public WorkPieceStorage()
{
source = DataFileSingleton.GetInstance();
}
public List<WorkPieceViewModel> GetFullList()
{
return source.WorkPieces.Select(x => x.GetViewModel).ToList();
}
public List<WorkPieceViewModel> GetFilteredList(WorkPieceSearchModel model)
{
if (string.IsNullOrEmpty(model.WorkPieceName))
{
return new();
}
return source.WorkPieces.Where(x => x.WorkPieceName.Contains(model.WorkPieceName)).Select(x => x.GetViewModel).ToList();
}
public WorkPieceViewModel? GetElement(WorkPieceSearchModel model)
{
if (string.IsNullOrEmpty(model.WorkPieceName) && !model.Id.HasValue)
{
return null;
}
return source.WorkPieces.FirstOrDefault(x => (!string.IsNullOrEmpty(model.WorkPieceName) && x.WorkPieceName == model.WorkPieceName)
|| (model.Id.HasValue && x.Id == model.Id))?.GetViewModel;
}
public WorkPieceViewModel? Insert(WorkPieceBindingModel model)
{
model.Id = source.WorkPieces.Count > 0 ? source.WorkPieces.Max(x => x.Id) + 1 : 1;
var newWorkPiece = WorkPiece.Create(model);
if (newWorkPiece == null)
{
return null;
}
source.WorkPieces.Add(newWorkPiece);
source.SaveWorkPieces();
return newWorkPiece.GetViewModel;
}
public WorkPieceViewModel? Update(WorkPieceBindingModel model)
{
var workPiece = source.WorkPieces.FirstOrDefault(x => x.Id == model.Id);
if (workPiece == null)
{
return null;
}
workPiece.Update(model);
source.SaveWorkPieces();
return workPiece.GetViewModel;
}
public WorkPieceViewModel? Delete(WorkPieceBindingModel model)
{
var element = source.WorkPieces.FirstOrDefault(x => x.Id == model.Id);
if (element != null)
{
source.WorkPieces.Remove(element);
source.SaveWorkPieces();
return element.GetViewModel;
}
return null;
}
}
}

View File

@ -0,0 +1,106 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace FurnitureAssemblyFileImplement.Models
{
public class Furniture : IFurnitureModel
{
public int Id { get; private set; }
public string FurnitureName { get; private set; } = string.Empty;
public double Price { get; private set; }
public Dictionary<int, int> WorkPieces { get; private set; } = new();
private Dictionary<int, (IWorkPieceModel, int)>? _furnitureWorkPieces = null;
public Dictionary<int, (IWorkPieceModel, int)> FurnitureWorkPieces
{
get
{
if (_furnitureWorkPieces == null)
{
var source = DataFileSingleton.GetInstance();
_furnitureWorkPieces = WorkPieces.ToDictionary(x => x.Key,
y => ((source.WorkPieces.FirstOrDefault(z => z.Id == y.Key) as IWorkPieceModel)!, y.Value));
}
return _furnitureWorkPieces;
}
}
public static Furniture? Create(FurnitureBindingModel model)
{
if (model == null)
{
return null;
}
return new Furniture()
{
Id = model.Id,
FurnitureName = model.FurnitureName,
Price = model.Price,
WorkPieces = model.FurnitureWorkPieces.ToDictionary(x => x.Key, x => x.Value.Item2)
};
}
public static Furniture? Create(XElement element)
{
if (element == null)
{
return null;
}
return new Furniture()
{
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
FurnitureName = element.Element("FurnitureName")!.Value,
Price = Convert.ToDouble(element.Element("Price")!.Value),
WorkPieces = element.Element("FurnitureWorkPieces")!.Elements("FurnitureWorkPieces").ToDictionary(
x => Convert.ToInt32(x.Element("Key")?.Value),
y => Convert.ToInt32(y.Element("Value")?.Value))
};
}
public void Update(FurnitureBindingModel model)
{
if (model == null)
{
return;
}
FurnitureName = model.FurnitureName;
Price = model.Price;
WorkPieces = model.FurnitureWorkPieces.ToDictionary(x => x.Key, x => x.Value.Item2);
_furnitureWorkPieces = null;
}
public FurnitureViewModel GetViewModel => new()
{
Id = Id,
FurnitureName = FurnitureName,
Price = Price,
FurnitureWorkPieces = FurnitureWorkPieces
};
public XElement GetXElement => new("Furniture",
new XAttribute("Id", Id),
new XElement("FurnitureName", FurnitureName),
new XElement("Price", Price.ToString()),
new XElement("FurnitureWorkPieces", WorkPieces.Select(
x => new XElement("FurnitureWorkPieces",
new XElement("Key", x.Key),
new XElement("Value", x.Value))
).ToArray()));
}
}

View File

@ -0,0 +1,100 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyDataModels.Enums;
using FurnitureAssemblyDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace FurnitureAssemblyFileImplement.Models
{
public class Order : IOrderModel
{
public int Id { get; private set; }
public int FurnitureId { get; private set; }
public int Count { get; private set; }
public double Sum { get; private set; }
public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен;
public DateTime DateCreate { get; private set; } = DateTime.Now;
public DateTime? DateImplement { get; private set; }
public static Order? Create(OrderBindingModel model)
{
if (model == null)
{
return null;
}
return new Order()
{
Id = model.Id,
FurnitureId = model.FurnitureId,
Count = model.Count,
Sum = model.Sum,
Status = model.Status,
DateCreate = model.DateCreate,
DateImplement = model.DateImplement
};
}
public static Order? Create(XElement element)
{
if (element == null)
{
return null;
}
return new Order()
{
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
FurnitureId = Convert.ToInt32(element.Element("FurnitureId")!.Value),
Count = Convert.ToInt32(element.Element("Count")!.Value),
Sum = Convert.ToDouble(element.Element("Sum")!.Value),
Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), element.Element("Status")!.Value),
DateCreate = Convert.ToDateTime(element.Element("DateCreate")!.Value),
DateImplement = string.IsNullOrEmpty(element.Element("DateImplement")!.Value) ? null :
Convert.ToDateTime(element.Element("DateImplement")!.Value)
};
}
public void Update(OrderBindingModel model)
{
if (model == null)
{
return;
}
Status = model.Status;
DateImplement = model.DateImplement;
}
public OrderViewModel GetViewModel => new()
{
Id = Id,
FurnitureId = FurnitureId,
Count = Count,
Sum = Sum,
Status = Status,
DateCreate = DateCreate,
DateImplement = DateImplement
};
public XElement GetXElement => new("Order",
new XAttribute("Id", Id),
new XElement("FurnitureId", FurnitureId.ToString()),
new XElement("Count", Count.ToString()),
new XElement("Sum", Sum.ToString()),
new XElement("Status", Status.ToString()),
new XElement("DateCreate", DateCreate.ToString()),
new XElement("DateImplement", DateImplement.ToString()));
}
}

View File

@ -0,0 +1,74 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace FurnitureAssemblyFileImplement.Models
{
public class WorkPiece : IWorkPieceModel
{
public int Id { get; private set; }
public string WorkPieceName { get; private set; } = string.Empty;
public double Cost { get; set; }
public static WorkPiece? Create(WorkPieceBindingModel model)
{
if (model == null)
{
return null;
}
return new WorkPiece()
{
Id = model.Id,
WorkPieceName = model.WorkPieceName,
Cost = model.Cost
};
}
public static WorkPiece? Create(XElement element)
{
if (element == null)
{
return null;
}
return new WorkPiece()
{
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
WorkPieceName = element.Element("WorkPieceName")!.Value,
Cost = Convert.ToDouble(element.Element("Cost")!.Value)
};
}
public void Update(WorkPieceBindingModel model)
{
if (model == null)
{
return;
}
WorkPieceName = model.WorkPieceName;
Cost = model.Cost;
}
public WorkPieceViewModel GetViewModel => new()
{
Id = Id,
WorkPieceName = WorkPieceName,
Cost = Cost
};
public XElement GetXElement => new("WorkPiece",
new XAttribute("Id", Id),
new XElement("WorkPieceName", WorkPieceName),
new XElement("Cost", Cost.ToString()));
}
}

View File

@ -28,79 +28,82 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
buttonAdd = new Button(); this.buttonAdd = new System.Windows.Forms.Button();
buttonUpdate = new Button(); this.buttonUpdate = new System.Windows.Forms.Button();
buttonDelete = new Button(); this.buttonDelete = new System.Windows.Forms.Button();
buttonRef = new Button(); this.buttonRef = new System.Windows.Forms.Button();
dataGridView = new DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
SuspendLayout(); this.SuspendLayout();
// //
// buttonAdd // buttonAdd
// //
buttonAdd.Location = new Point(640, 35); this.buttonAdd.Location = new System.Drawing.Point(560, 26);
buttonAdd.Name = "buttonAdd"; this.buttonAdd.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
buttonAdd.Size = new Size(116, 50); this.buttonAdd.Name = "buttonAdd";
buttonAdd.TabIndex = 0; this.buttonAdd.Size = new System.Drawing.Size(102, 38);
buttonAdd.Text = "Добавить"; this.buttonAdd.TabIndex = 0;
buttonAdd.UseVisualStyleBackColor = true; this.buttonAdd.Text = "Добавить";
buttonAdd.Click += ButtonAdd_Click; this.buttonAdd.UseVisualStyleBackColor = true;
// //
// buttonUpdate // buttonUpdate
// //
buttonUpdate.Location = new Point(640, 105); this.buttonUpdate.Location = new System.Drawing.Point(560, 79);
buttonUpdate.Name = "buttonUpdate"; this.buttonUpdate.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
buttonUpdate.Size = new Size(116, 50); this.buttonUpdate.Name = "buttonUpdate";
buttonUpdate.TabIndex = 1; this.buttonUpdate.Size = new System.Drawing.Size(102, 38);
buttonUpdate.Text = "Изменить"; this.buttonUpdate.TabIndex = 1;
buttonUpdate.UseVisualStyleBackColor = true; this.buttonUpdate.Text = "Изменить";
buttonUpdate.Click += ButtonUpdate_Click; this.buttonUpdate.UseVisualStyleBackColor = true;
// //
// buttonDelete // buttonDelete
// //
buttonDelete.Location = new Point(640, 175); this.buttonDelete.Location = new System.Drawing.Point(560, 131);
buttonDelete.Name = "buttonDelete"; this.buttonDelete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
buttonDelete.Size = new Size(116, 50); this.buttonDelete.Name = "buttonDelete";
buttonDelete.TabIndex = 2; this.buttonDelete.Size = new System.Drawing.Size(102, 38);
buttonDelete.Text = "Удалить"; this.buttonDelete.TabIndex = 2;
buttonDelete.UseVisualStyleBackColor = true; this.buttonDelete.Text = "Удалить";
buttonDelete.Click += ButtonDelete_Click; this.buttonDelete.UseVisualStyleBackColor = true;
// //
// buttonRef // buttonRef
// //
buttonRef.Location = new Point(640, 245); this.buttonRef.Location = new System.Drawing.Point(560, 184);
buttonRef.Name = "buttonRef"; this.buttonRef.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
buttonRef.Size = new Size(116, 50); this.buttonRef.Name = "buttonRef";
buttonRef.TabIndex = 3; this.buttonRef.Size = new System.Drawing.Size(102, 38);
buttonRef.Text = "Обновить"; this.buttonRef.TabIndex = 3;
buttonRef.UseVisualStyleBackColor = true; this.buttonRef.Text = "Обновить";
buttonRef.Click += ButtonRef_Click; this.buttonRef.UseVisualStyleBackColor = true;
// //
// dataGridView // dataGridView
// //
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Location = new Point(12, 12); this.dataGridView.Location = new System.Drawing.Point(10, 9);
dataGridView.Name = "dataGridView"; this.dataGridView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
dataGridView.RowHeadersWidth = 51; this.dataGridView.Name = "dataGridView";
dataGridView.RowTemplate.Height = 29; this.dataGridView.RowHeadersWidth = 51;
dataGridView.Size = new Size(604, 426); this.dataGridView.RowTemplate.Height = 29;
dataGridView.TabIndex = 4; this.dataGridView.Size = new System.Drawing.Size(528, 320);
this.dataGridView.TabIndex = 4;
// //
// FormFurnitures // FormFurnitures
// //
AutoScaleDimensions = new SizeF(8F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new Size(781, 450); this.ClientSize = new System.Drawing.Size(683, 338);
Controls.Add(dataGridView); this.Controls.Add(this.dataGridView);
Controls.Add(buttonRef); this.Controls.Add(this.buttonRef);
Controls.Add(buttonDelete); this.Controls.Add(this.buttonDelete);
Controls.Add(buttonUpdate); this.Controls.Add(this.buttonUpdate);
Controls.Add(buttonAdd); this.Controls.Add(this.buttonAdd);
Name = "FormFurnitures"; this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
Text = "Изделия"; this.Name = "FormFurnitures";
Load += FormFurnitures_Load; this.Text = "Изделия";
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); this.Load += new System.EventHandler(this.FormFurnitures_Load);
ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
} }
#endregion #endregion

View File

@ -132,14 +132,14 @@
// workPieceToolStripMenuItem // workPieceToolStripMenuItem
// //
this.workPieceToolStripMenuItem.Name = "workPieceToolStripMenuItem"; this.workPieceToolStripMenuItem.Name = "workPieceToolStripMenuItem";
this.workPieceToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.workPieceToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
this.workPieceToolStripMenuItem.Text = "Заготовки"; this.workPieceToolStripMenuItem.Text = "Заготовки";
this.workPieceToolStripMenuItem.Click += new System.EventHandler(this.WorkPieceToolStripMenuItem_Click); this.workPieceToolStripMenuItem.Click += new System.EventHandler(this.WorkPieceToolStripMenuItem_Click);
// //
// furnitureToolStripMenuItem // furnitureToolStripMenuItem
// //
this.furnitureToolStripMenuItem.Name = "furnitureToolStripMenuItem"; this.furnitureToolStripMenuItem.Name = "furnitureToolStripMenuItem";
this.furnitureToolStripMenuItem.Size = new System.Drawing.Size(180, 22); this.furnitureToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
this.furnitureToolStripMenuItem.Text = "Изделия"; this.furnitureToolStripMenuItem.Text = "Изделия";
this.furnitureToolStripMenuItem.Click += new System.EventHandler(this.FurnitureToolStripMenuItem_Click); this.furnitureToolStripMenuItem.Click += new System.EventHandler(this.FurnitureToolStripMenuItem_Click);
// //
@ -159,6 +159,7 @@
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FormMain"; this.Name = "FormMain";
this.Text = "Сборка мебели"; this.Text = "Сборка мебели";
this.Load += new System.EventHandler(this.FormMain_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.menuStrip.ResumeLayout(false); this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout(); this.menuStrip.PerformLayout();

View File

@ -17,6 +17,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FurnitureAssemblyBusinessLogic\FurnitureAssemblyBusinessLogic.csproj" /> <ProjectReference Include="..\FurnitureAssemblyBusinessLogic\FurnitureAssemblyBusinessLogic.csproj" />
<ProjectReference Include="..\FurnitureAssemblyContracts\FurnitureAssemblyContracts.csproj" /> <ProjectReference Include="..\FurnitureAssemblyContracts\FurnitureAssemblyContracts.csproj" />
<ProjectReference Include="..\FurnitureAssemblyFileImplement\FurnitureAssemblyFileImplement.csproj" />
<ProjectReference Include="..\FurnitureAssemblyListImplement\FurnitureAssemblyListImplement.csproj" /> <ProjectReference Include="..\FurnitureAssemblyListImplement\FurnitureAssemblyListImplement.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -1,7 +1,7 @@
using FurnitureAssemblyBusinessLogic.BussinessLogic; using FurnitureAssemblyBusinessLogic.BussinessLogic;
using FurnitureAssemblyContracts.BusinessLogicsContracts; using FurnitureAssemblyContracts.BusinessLogicsContracts;
using FurnitureAssemblyContracts.StoragesContracts; using FurnitureAssemblyContracts.StoragesContracts;
using FurnitureAssemblyListImplement.Implements; using FurnitureAssemblyFileImplement.Implements;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;