ISEbd-22 Alimova M.S. Lab Work 01 base #1

Closed
malimova wants to merge 13 commits from Lab1_base into main
8 changed files with 86 additions and 6 deletions
Showing only changes of commit 3263e19af1 - Show all commits

View File

@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Confectionery", "Confectionery\Confectionery.csproj", "{3FBA3531-D080-42B2-869B-AF42CCF9C770}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Confectionery", "Confectionery\Confectionery.csproj", "{3FBA3531-D080-42B2-869B-AF42CCF9C770}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfectioneryDataModels", "ConfectioneryDataModels\ConfectioneryDataModels.csproj", "{B1066AB3-A781-49D8-9629-DAEEB7AEB926}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConfectioneryDataModels", "ConfectioneryDataModels\ConfectioneryDataModels.csproj", "{B1066AB3-A781-49D8-9629-DAEEB7AEB926}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfectioneryContracts", "ConfectioneryContracts\ConfectioneryContracts.csproj", "{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -21,6 +23,10 @@ Global
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1066AB3-A781-49D8-9629-DAEEB7AEB926}.Release|Any CPU.Build.0 = Release|Any CPU
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FFC8BF0-172F-4A99-AF4E-8FCEC210FF36}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,16 @@
using ConfectioneryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConfectioneryContracts.BindingModels
{
public class ComponentBindingModel : IComponentModel
{
public int Id { get; set; }
public string ComponentName { get; set; } = string.Empty;
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using ConfectioneryDataModels.Enums;
using ConfectioneryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConfectioneryContracts.BindingModels
{
public class OrderBindingModel : IOrderModel
{
public int Id { get; set; }
public int PastryId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
public DateTime DateCreate { get; set; } = DateTime.Now;
public DateTime? DateImplement { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using ConfectioneryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConfectioneryContracts.BindingModels
{
public class PastryBindingModel : IPastryModel
{
public int Id { get; set; }
public string PastryName { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> PastryComponents { get; set; } = new();
}
}

View File

@ -1,4 +1,4 @@
namespace ConfectioneryDataModels
namespace ConfectioneryContracts
Review

Пустых классов быть не должно

Пустых классов быть не должно
{
public class Class1
{

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ConfectioneryDataModels\ConfectioneryDataModels.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts\" />
<Folder Include="SearchModels\" />
<Folder Include="StoragesContracts\" />
<Folder Include="ViewModels\" />
</ItemGroup>
</Project>

View File

@ -9,7 +9,7 @@ namespace ConfectioneryDataModels.Models
{
public interface IOrderModel : IId
{
int ProductId { get; }
int PastryId { get; }
int Count { get; }
double Sum { get; }
OrderStatus Status { get; }

View File

@ -6,10 +6,10 @@ using System.Threading.Tasks;
namespace ConfectioneryDataModels.Models
{
internal interface IPastryModel : IId
public interface IPastryModel : IId
{
string PastryName { get; }
double Price { get; }
Dictionary<int, (IComponentModel, int)> ProductComponents { get; }
Dictionary<int, (IComponentModel, int)> PastryComponents { get; }
}
}