+ OfficePackage - HelperEnums

This commit is contained in:
FLARJ 2023-04-07 19:27:46 +04:00
parent 9e908c8406
commit 741fb376a5
5 changed files with 56 additions and 23 deletions

View File

@ -12,4 +12,8 @@
<ProjectReference Include="..\FurnitureFactoryDataModels\FurnitureFactoryDataModels.csproj" /> <ProjectReference Include="..\FurnitureFactoryDataModels\FurnitureFactoryDataModels.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="OfficePackage\" />
</ItemGroup>
</Project> </Project>

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -10,22 +10,12 @@ using FurnitureContracts.ViewModel;
using FurnitureContracts.SearchModels; using FurnitureContracts.SearchModels;
using FurnitureContracts.StoragesContracts; using FurnitureContracts.StoragesContracts;
using FurnitureFactoryDataBaseImplements.Models; using FurnitureFactoryDataBaseImplements.Models;
using FurnitureFactoryDataBaseImplement;
namespace FurnitureFactoryDataBaseImplements.Implements namespace FurnitureFactoryDataBaseImplements.Implements
{ {
public class HeadsetStorage : IHeadsetStorage public class HeadsetStorage : IHeadsetStorage
{ {
//int Cost { get; }
//string Size { get; }
//public Dictionary<int, ISalesSalonsModel> HeadsetSalesSalons { get; }
//int ManagerId { get; }
//int HeadsetModuleId { get; }
public List<HeadsetViewModel> GetFullList() public List<HeadsetViewModel> GetFullList()
{ {
using var context = new FurnitureDataBase(); using var context = new FurnitureDataBase();
@ -45,20 +35,10 @@ namespace FurnitureFactoryDataBaseImplements.Implements
return new(); return new();
} }
using var context = new FurnitureDataBase(); 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 return context.Headsets
.Include(x => x.SalesSalons) .Include(x => x.SalesSalons)
.ThenInclude(x => x.SalesSalon) .ThenInclude(x => x.SalesSalons)
.Where(x => x.ManagerId == model.ManagerId) .Where(x => x.ManagerId == model.ManagerId)
.ToList() .ToList()
.Select(x => x.GetViewModel) .Select(x => x.GetViewModel)
@ -76,7 +56,7 @@ namespace FurnitureFactoryDataBaseImplements.Implements
.Include(x => x.SalesSalons) .Include(x => x.SalesSalons)
.ThenInclude(x => x.SalesSalons) .ThenInclude(x => x.SalesSalons)
.FirstOrDefault(x => ((!string.IsNullOrEmpty(model.Size) && x.Size == model.Size) || .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; ?.GetViewModel;
} }