Полностью рабочая лр

This commit is contained in:
Arklightning 2023-03-28 13:08:16 +04:00
parent ddc088cbb3
commit ef5b4b2793
8 changed files with 10 additions and 8 deletions

View File

@ -16,6 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\CarRepairShopBisinessLogic\CarRepairShopBisinessLogic.csproj" />
<ProjectReference Include="..\CarRepairShopFileImplement\CarRepairShopFileImplement.csproj" />
<ProjectReference Include="..\CarRepairShopListImplement\CarRepairShopListImplement.csproj" />
</ItemGroup>

View File

@ -41,6 +41,7 @@ namespace CarRepairShop
{
dataGridView.DataSource = list;
dataGridView.Columns["CarId"].Visible = false;
dataGridView.Columns["CarName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
}
_logger.LogInformation("Загрузка заказов");
}

View File

@ -4,7 +4,8 @@ using NLog.Extensions.Logging;
using CarRepairShopBusinessLogic.BusinessLogics;
using CarRepairShopContracts.BusinessLogicsContracts;
using CarRepairShopContracts.StoragesContracts;
using CarRepairShopListImplement.Implements;
using CarRepairShopFileImplement.Implements;
//using CarRepairShopListImplement.Implements;
using CarRepairShop;
using System.Drawing;
using CarRepairShopBisinessLogic.BusinessLogic;

View File

@ -1,5 +1,4 @@
using CarRepairShopFileImplement.Models;
using FoodOrdersFileImplement.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;

View File

@ -12,7 +12,7 @@ using System.Threading.Tasks;
namespace CarRepairShopFileImplement.Implements
{
internal class CarStorage : ICarStorage
public class CarStorage : ICarStorage
{
private readonly DataFileSingleton _source;
public CarStorage()

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace CarRepairShopFileImplement.Implements
{
internal class DetailStorage : IDetailStorage
public class DetailStorage : IDetailStorage
{
private readonly DataFileSingleton _source;
public DetailStorage()

View File

@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace CarRepairShopFileImplement.Implements
{
internal class OrderStorage : IOrderStorage
public class OrderStorage : IOrderStorage
{
private readonly DataFileSingleton _source;
public OrderStorage()

View File

@ -35,7 +35,7 @@ namespace CarRepairShopFileImplement.Models
return new Car()
{
Id = Convert.ToInt32(element.Attribute("Id")!.Value),
CarName = element.Element("ComponentName")!.Value,
CarName = element.Element("CarName")!.Value,
Price= Convert.ToDouble(element.Element("Cost")!.Value)
};
}
@ -55,9 +55,9 @@ namespace CarRepairShopFileImplement.Models
Price = Price
};
public XElement GetXElement => new(
"Component",
"Car",
new XAttribute("Id", Id),
new XElement("CartName", CarName),
new XElement("CarName", CarName),
new XElement("Cost", Price.ToString())
);
}