Add new lib.
This commit is contained in:
parent
352635edf0
commit
d77baa2273
@ -0,0 +1,33 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.BindingModel
|
||||
{
|
||||
public class LabWorkBindingModel : ILabWork
|
||||
{
|
||||
public int Id {get; set; }
|
||||
|
||||
public string Theme { get; set; } = string.Empty;
|
||||
|
||||
public List<string> FCs { get; set; }
|
||||
|
||||
public List<string> Disciplines { get; set; }
|
||||
|
||||
public string[] Questions { get; set; }
|
||||
|
||||
public LabWorkBindingModel() { }
|
||||
|
||||
public LabWorkBindingModel(ILabWork labWork)
|
||||
{
|
||||
Id = labWork.Id;
|
||||
Theme = labWork.Theme;
|
||||
FCs = labWork.FCs;
|
||||
Disciplines = labWork.Disciplines;
|
||||
Questions = labWork.Questions;
|
||||
}
|
||||
}
|
||||
}
|
13
VisualComponentsForm/Contracts/Contracts.csproj
Normal file
13
VisualComponentsForm/Contracts/Contracts.csproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataModels\DataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.SearchModel
|
||||
{
|
||||
public class LabWorkSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public string? Theme { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using Contracts.BindingModel;
|
||||
using Contracts.SearchModel;
|
||||
using Contracts.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.StorageContracts
|
||||
{
|
||||
public interface ILabWorkStorage
|
||||
{
|
||||
List<LabWorkViewModel> GetFullList();
|
||||
|
||||
LabWorkViewModel? GetElement(LabWorkSearchModel model);
|
||||
|
||||
List<LabWorkViewModel> GetFilteredList(LabWorkSearchModel model);
|
||||
|
||||
LabWorkViewModel? Insert(LabWorkBindingModel model);
|
||||
|
||||
LabWorkViewModel? Update(LabWorkBindingModel model);
|
||||
|
||||
LabWorkViewModel? Delete(LabWorkBindingModel model);
|
||||
}
|
||||
}
|
33
VisualComponentsForm/Contracts/ViewModel/LabWorkViewModel.cs
Normal file
33
VisualComponentsForm/Contracts/ViewModel/LabWorkViewModel.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using DataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Contracts.ViewModel
|
||||
{
|
||||
public class LabWorkViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Theme { get; set; } = string.Empty;
|
||||
|
||||
public List<string> FCs { get; set; }
|
||||
|
||||
public List<string> Disciplines { get; set; }
|
||||
|
||||
public string[] Questions { get; set; }
|
||||
|
||||
public LabWorkViewModel() { }
|
||||
|
||||
public LabWorkViewModel(ILabWork labWork)
|
||||
{
|
||||
Id = labWork.Id;
|
||||
Theme = labWork.Theme;
|
||||
FCs = labWork.FCs;
|
||||
Disciplines = labWork.Disciplines;
|
||||
Questions = labWork.Questions;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,8 +6,4 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
21
VisualComponentsForm/DataModels/Models/ILabWork.cs
Normal file
21
VisualComponentsForm/DataModels/Models/ILabWork.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataModels.Models
|
||||
{
|
||||
public interface ILabWork : IId
|
||||
{
|
||||
string Theme { get; }
|
||||
|
||||
//ФИО
|
||||
List<string> FCs { get; }
|
||||
|
||||
List<string> Disciplines { get; }
|
||||
|
||||
//Вопросы по лабораторной
|
||||
string[] Questions { get; }
|
||||
}
|
||||
}
|
@ -9,6 +9,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualComponentsLib", "..\V
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataModels", "DataModels\DataModels.csproj", "{D208DBE1-5E90-4611-BAFD-2B021BCE0ADA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contracts", "Contracts\Contracts.csproj", "{E78467E3-3100-4F40-B454-7C44CB49FAB4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D208DBE1-5E90-4611-BAFD-2B021BCE0ADA} = {D208DBE1-5E90-4611-BAFD-2B021BCE0ADA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -27,6 +32,10 @@ Global
|
||||
{D208DBE1-5E90-4611-BAFD-2B021BCE0ADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D208DBE1-5E90-4611-BAFD-2B021BCE0ADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D208DBE1-5E90-4611-BAFD-2B021BCE0ADA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E78467E3-3100-4F40-B454-7C44CB49FAB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E78467E3-3100-4F40-B454-7C44CB49FAB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E78467E3-3100-4F40-B454-7C44CB49FAB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E78467E3-3100-4F40-B454-7C44CB49FAB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
Reference in New Issue
Block a user