Правки

This commit is contained in:
nikbel2004@outlook.com 2024-05-11 01:31:20 +04:00
parent 2c888ca8a5
commit 2bcf267d1e
12 changed files with 23 additions and 23 deletions

View File

@ -11,8 +11,7 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="MigraDocCore.DocumentObjectModel" Version="1.3.63" />
<PackageReference Include="MigraDocCore.Rendering" Version="1.3.63" />
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
<PackageReference Include="PdfSharp.MigraDoc.Standard.DocumentObjectModel" Version="1.51.15" />
<PackageReference Include="PDFsharp-MigraDoc-GDI" Version="1.50.5147" />
</ItemGroup>
<ItemGroup>

View File

@ -310,7 +310,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
else
{
// Все ячейки должны быть последовательно друг за другом расположены
// нужно определить, после какой вставлять
// Нужно определить, после какой вставлять
Cell? refCell = null;
foreach (Cell rowCell in row.Elements<Cell>())
@ -385,7 +385,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
}
_spreadsheetDocument.WorkbookPart!.Workbook.Save();
_spreadsheetDocument.Close();
_spreadsheetDocument.Dispose();
}
}
}

View File

@ -114,6 +114,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
var docRun = new Run();
var properties = new RunProperties();
// Задание свойств текста - размер и жирность
properties.AppendChild(new FontSize { Val = run.Item2.Size });
if (run.Item2.Bold)
@ -145,7 +146,7 @@ namespace FurnitureAssemblyBusinessLogic.OfficePackage.Implements
// Сохраняем документ
_wordDocument.MainDocumentPart!.Document.Save();
_wordDocument.Close();
_wordDocument.Dispose();
}
protected override void CreateTable(WordParagraph paragraph)

View File

@ -12,10 +12,10 @@ namespace FurnitureAssemblyContracts.BindingModels
{
public int Id { get; set; }
public int FurnitureId { get; set; }
public int ClientId { get; set; }
public int FurnitureId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }

View File

@ -6,15 +6,15 @@ using System.Threading.Tasks;
namespace FurnitureAssemblyContracts.SearchModels
{
// Модель для поиска клиентов
// Модель для поиска клиента
public class ClientSearchModel
{
public int? Id { get; set; }
public string? ClientFIO { get; set; }
public string? Email { get; set; }
public string? ClientFIO { get; set; }
public string? Password { get; set; }
}
}

View File

@ -12,8 +12,10 @@ namespace FurnitureAssemblyContracts.SearchModels
// для поиска по идентификатору
public int? Id { get; set; }
// для поиска по клиенту
public int? ClientId { get; set; }
// Два поля для возможности производить выборку
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }

View File

@ -15,16 +15,16 @@ namespace FurnitureAssemblyContracts.ViewModels
[DisplayName("Номер")]
public int Id { get; set; }
public int FurnitureId { get; set; }
[DisplayName("Изделие")]
public string FurnitureName { get; set; } = string.Empty;
public int ClientId { get; set; }
[DisplayName("ФИО клиента")]
public string ClientFIO { get; set; } = string.Empty;
public int FurnitureId { get; set; }
[DisplayName("Изделие")]
public string FurnitureName { get; set; } = string.Empty;
[DisplayName("Количество")]
public int Count { get; set; }

View File

@ -6,6 +6,7 @@ using System.Threading.Tasks;
namespace FurnitureAssemblyDataModels.Models
{
// Интерфейс, отвечающий за клиента
public interface IClientModel : IId
{
string ClientFIO { get; }

View File

@ -1,5 +1,4 @@
using BlacksmithWorkshopDatabaseImplement.Models;
using FurnitureAssemblyDatabaseImplement.Models;
using FurnitureAssemblyDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
@ -15,7 +14,7 @@ namespace FurnitureAssemblyDatabaseImplement
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=KatanaNik\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);

View File

@ -1,4 +1,4 @@
using BlacksmithWorkshopDatabaseImplement.Models;
using FurnitureAssemblyDatabaseImplement.Models;
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.SearchModels;
using FurnitureAssemblyContracts.StoragesContracts;

View File

@ -1,7 +1,5 @@
using FurnitureAssemblyContracts.BindingModels;
using FurnitureAssemblyContracts.ViewModels;
using FurnitureAssemblyDatabaseImplement;
using FurnitureAssemblyDatabaseImplement.Models;
using FurnitureAssemblyDataModels.Models;
using System;
using System.Collections.Generic;
@ -11,7 +9,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BlacksmithWorkshopDatabaseImplement.Models
namespace FurnitureAssemblyDatabaseImplement.Models
{
public class Shop : IShopModel
{

View File

@ -1,4 +1,4 @@
using BlacksmithWorkshopDatabaseImplement.Models;
using FurnitureAssemblyDatabaseImplement.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;