first edit

This commit is contained in:
Курнат Андрей
2026-01-31 16:11:36 +03:00
commit f0e11d6379
148 changed files with 6986 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace XLIMS.CONTRACT
{
public interface IActivityViewModel
{
string Title { get; }
object View { get; }
}
}

View File

@@ -0,0 +1,12 @@
namespace XLIMS.CONTRACT;
public interface IDialogService
{
void ShowDialog<TViewModel>(TViewModel viewModel) where TViewModel : class;
// Если нужны модальные окна с результатом:
bool? ShowDialog<TViewModel>(TViewModel viewModel, out object? result)
where TViewModel : class;
//немодальные окна
void Show<TViewModel>(TViewModel viewModel) where TViewModel : class;
}

View File

@@ -0,0 +1,32 @@
using System.Linq.Expressions;
namespace XLIMS.CONTRACT
{
// Интерфейс generic-репозитория
public interface IGenericRepository<TEntity> where TEntity : class
{
Task<TEntity> GetByIdAsync(int id);
Task<IEnumerable<TEntity>> GetAllAsync();
Task<IEnumerable<TEntity>> WhereAsync(Expression<Func<TEntity, bool>> predicate);
IEnumerable<TEntity> Find(Expression<Func<TEntity, bool>> predicate);
Task<IEnumerable<TEntity>> FindAsync(Expression<Func<TEntity, bool>> predicate);
Task<TEntity> SingleOrDefaultAsync(Expression<Func<TEntity, bool>> predicate);
Task AddAsync(TEntity entity);
Task AddRangeAsync(IEnumerable<TEntity> entities);
Task UpdateAsync(TEntity entity);
Task UpdateRangeAsync(IEnumerable<TEntity> entities);
Task RemoveAsync(TEntity entity);
Task RemoveRangeAsync(IEnumerable<TEntity> entities);
Task<int> CountAsync(Expression<Func<TEntity, bool>> predicate = null);
event Action SetChanged;
Task<int> SaveChangesAsync();
int SaveChanges();
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using XLIMS.DATA.Models;
namespace XLIMS.CONTRACT
{
public interface ILimsService
{
IGenericRepository<BookSet> Books { get; }
IGenericRepository<DataSet> Datas { get; }
IGenericRepository<DeviceSet> Devices { get; }
IGenericRepository<DivisionSet> Divisions { get; }
IGenericRepository<DocumentSet> Documents { get; }
IGenericRepository<PersonalSet> Personals { get; }
IGenericRepository<Spnmtp> Spnmtps { get; }
IGenericRepository<Spoi> Spois { get; }
IGenericRepository<Tip> Tips { get; }
IGenericRepository<Tprz> Tprzs { get; }
Task<int> SaveChangesAsync();
int SaveChanges();
}
}

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Remove="IBookService.cs" />
<Compile Remove="IDataSetService.cs" />
<Compile Remove="IDeviceService.cs" />
<Compile Remove="IDivisionService.cs" />
<Compile Remove="IDocumentService.cs" />
<Compile Remove="ILimsService1.cs" />
<Compile Remove="IPersonalService.cs" />
<Compile Remove="ISpnmtpService.cs" />
<Compile Remove="ISpoiService.cs" />
<Compile Remove="ITipService.cs" />
<Compile Remove="ITprzService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XLIMS.DATA\XLIMS.DATA.csproj" />
</ItemGroup>
</Project>