From 741fb376a5a019da4502a93a10b18df87cf50afc Mon Sep 17 00:00:00 2001
From: FLARJ <122087628+FLARJ@users.noreply.github.com>
Date: Fri, 7 Apr 2023 19:27:46 +0400
Subject: [PATCH] + OfficePackage - HelperEnums
---
.../FurnitureFactoryBusinessLogic.csproj | 4 +++
.../HelperEnums/ExcelStyleInfoType.cs | 17 ++++++++++++
.../HelperEnums/PdfParagraphAlignmentType.cs | 17 ++++++++++++
.../HelperEnums/WordJustificationType.cs | 15 +++++++++++
.../Implements/HeadsetStorage.cs | 26 +++----------------
5 files changed, 56 insertions(+), 23 deletions(-)
create mode 100644 FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/ExcelStyleInfoType.cs
create mode 100644 FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
create mode 100644 FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/WordJustificationType.cs
diff --git a/FurnitureFactory/FurnitureFactoryBusinessLogic/FurnitureFactoryBusinessLogic.csproj b/FurnitureFactory/FurnitureFactoryBusinessLogic/FurnitureFactoryBusinessLogic.csproj
index 1b1970b..8e58883 100644
--- a/FurnitureFactory/FurnitureFactoryBusinessLogic/FurnitureFactoryBusinessLogic.csproj
+++ b/FurnitureFactory/FurnitureFactoryBusinessLogic/FurnitureFactoryBusinessLogic.csproj
@@ -12,4 +12,8 @@
+
+
+
+
diff --git a/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/ExcelStyleInfoType.cs b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/ExcelStyleInfoType.cs
new file mode 100644
index 0000000..213d87e
--- /dev/null
+++ b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/ExcelStyleInfoType.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SchoolAgainStudyBusinessLogic.OfficePackage.HelperEnums
+{
+ public enum ExcelStyleInfoType
+ {
+ Title,
+
+ Text,
+
+ TextWithBroder
+ }
+}
diff --git a/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
new file mode 100644
index 0000000..ca90df5
--- /dev/null
+++ b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/PdfParagraphAlignmentType.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SchoolAgainStudyBusinessLogic.OfficePackage.HelperEnums
+{
+ public enum PdfParagraphAlignmentType
+ {
+ Center,
+
+ Left,
+
+ Rigth
+ }
+}
diff --git a/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/WordJustificationType.cs b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/WordJustificationType.cs
new file mode 100644
index 0000000..171b5f4
--- /dev/null
+++ b/FurnitureFactory/FurnitureFactoryBusinessLogic/OfficePackage/HelperEnums/WordJustificationType.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SchoolAgainStudyBusinessLogic.OfficePackage.HelperEnums
+{
+ public enum WordJustificationType
+ {
+ Center,
+
+ Both
+ }
+}
diff --git a/FurnitureFactory/FurnitureFactoryDataBaseImplement/Implements/HeadsetStorage.cs b/FurnitureFactory/FurnitureFactoryDataBaseImplement/Implements/HeadsetStorage.cs
index d4be540..8c52892 100644
--- a/FurnitureFactory/FurnitureFactoryDataBaseImplement/Implements/HeadsetStorage.cs
+++ b/FurnitureFactory/FurnitureFactoryDataBaseImplement/Implements/HeadsetStorage.cs
@@ -10,22 +10,12 @@ using FurnitureContracts.ViewModel;
using FurnitureContracts.SearchModels;
using FurnitureContracts.StoragesContracts;
using FurnitureFactoryDataBaseImplements.Models;
+using FurnitureFactoryDataBaseImplement;
namespace FurnitureFactoryDataBaseImplements.Implements
{
public class HeadsetStorage : IHeadsetStorage
{
- //int Cost { get; }
- //string Size { get; }
- //public Dictionary HeadsetSalesSalons { get; }
- //int ManagerId { get; }
- //int HeadsetModuleId { get; }
-
-
-
-
-
-
public List GetFullList()
{
using var context = new FurnitureDataBase();
@@ -45,20 +35,10 @@ namespace FurnitureFactoryDataBaseImplements.Implements
return new();
}
using var context = new FurnitureDataBase();
- //if (model.DateFrom.HasValue && model.DateTo.HasValue && model.StudentId.HasValue)
- //{
- // return context.Diys
- // .Include(x => x.Interests)
- // .ThenInclude(x => x.Interest)
- // .Where(x => x.DateCreate >= model.DateFrom && x.DateCreate <= model.DateTo && x.StudentId == model.StudentId)
- // .ToList()
- // .Select(x => x.GetViewModel)
- // .ToList();
- //}
return context.Headsets
.Include(x => x.SalesSalons)
- .ThenInclude(x => x.SalesSalon)
+ .ThenInclude(x => x.SalesSalons)
.Where(x => x.ManagerId == model.ManagerId)
.ToList()
.Select(x => x.GetViewModel)
@@ -76,7 +56,7 @@ namespace FurnitureFactoryDataBaseImplements.Implements
.Include(x => x.SalesSalons)
.ThenInclude(x => x.SalesSalons)
.FirstOrDefault(x => ((!string.IsNullOrEmpty(model.Size) && x.Size == model.Size) ||
- (model.Id.HasValue && x.Id == model.Id)) && x.ManagertId == model.ManagerId)
+ (model.Id.HasValue && x.Id == model.Id)) && x.ManagerId == model.ManagerId)
?.GetViewModel;
}