Изменение полей и связей сущностей
This commit is contained in:
parent
4452263b26
commit
8063d884cc
@ -7,6 +7,7 @@ namespace FurnitureContracts.BindingModels
|
|||||||
public string Size { get; set; } = string.Empty;
|
public string Size { get; set; } = string.Empty;
|
||||||
public int Cost { get; set; }
|
public int Cost { get; set; }
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public int ManagerId { get; set; }
|
||||||
public Dictionary<int, IHeadsetModuleModel> HeadsetModuleId { get; set; }
|
public Dictionary<int, IHeadsetModuleModel> HeadsetModuleId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
using FurnitureFactoryDataModels.Models;
|
||||||
|
|
||||||
|
namespace FurnitureContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ManagerBindingModel : IManagerModel
|
||||||
|
{
|
||||||
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
public string Login { get; }
|
||||||
|
public string Password { get; }
|
||||||
|
public string Role { get; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -7,7 +7,7 @@ namespace FurnitureContracts.BindingModels
|
|||||||
public DateTime Date { get; set; } = DateTime.Now;
|
public DateTime Date { get; set; } = DateTime.Now;
|
||||||
public string Status { get; set; } = string.Empty;
|
public string Status { get; set; } = string.Empty;
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public int ManagerId { get; set; }
|
||||||
public Dictionary<int, IFurnitureModel> FurnitureId { get; set; }
|
public Dictionary<int, IFurnitureModel> FurnitureId { get; set; }
|
||||||
public Dictionary<int, IHeadsetModel> HeadsetId { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
using FurnitureFactoryDataModels.Models;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.BindingModels
|
|
||||||
{
|
|
||||||
public class RoleBindingModel : IRoleModel
|
|
||||||
{
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public int Id { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,5 +8,6 @@ namespace FurnitureContracts.BindingModels
|
|||||||
public string Address { get; set; } = string.Empty;
|
public string Address { get; set; } = string.Empty;
|
||||||
public Dictionary<int, IOrdersModel> OrdersId { get; set; }
|
public Dictionary<int, IOrdersModel> OrdersId { get; set; }
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public int ManagerId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
using FurnitureContracts.BindingModels;
|
||||||
|
using FurnitureContracts.SearchModels;
|
||||||
|
using FurnitureContracts.ViewModel;
|
||||||
|
|
||||||
|
namespace FurnitureContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IManagerLogic
|
||||||
|
{
|
||||||
|
List<ManagerViewModel>? ReadList(ManagerSearchModel? model);
|
||||||
|
ManagerViewModel? ReadElement(ManagerSearchModel model);
|
||||||
|
bool Create(ManagerBindingModel model);
|
||||||
|
bool Update(ManagerBindingModel model);
|
||||||
|
bool Delete(ManagerBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +0,0 @@
|
|||||||
using FurnitureContracts.BindingModels;
|
|
||||||
using FurnitureContracts.SearchModels;
|
|
||||||
using FurnitureContracts.ViewModel;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.BusinessLogicsContracts
|
|
||||||
{
|
|
||||||
public interface IRoleLogic
|
|
||||||
{
|
|
||||||
List<RoleViewModel>? ReadList(SalesSalonsSearchModel? model);
|
|
||||||
RoleViewModel? ReadElement(SalesSalonsSearchModel model);
|
|
||||||
bool Create(SalesSalonsBindingModel model);
|
|
||||||
bool Update(SalesSalonsBindingModel model);
|
|
||||||
bool Delete(SalesSalonsBindingModel model);
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FurnitureContracts.SearchModels
|
namespace FurnitureContracts.SearchModels
|
||||||
{
|
{
|
||||||
public class RoleSearchModel
|
public class ManagerSearchModel
|
||||||
{
|
{
|
||||||
public string? Name { get; set; }
|
public string? UserName { get; set; }
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using FurnitureContracts.BindingModels;
|
||||||
|
using FurnitureContracts.SearchModels;
|
||||||
|
using FurnitureContracts.ViewModel;
|
||||||
|
|
||||||
|
namespace FurnitureContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IManagerStorage
|
||||||
|
{
|
||||||
|
List<ManagerViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<ManagerViewModel> GetFilteredList(ManagerSearchModel model);
|
||||||
|
|
||||||
|
ManagerViewModel? GetElement(ManagerSearchModel model);
|
||||||
|
|
||||||
|
ManagerViewModel? Insert(ManagerBindingModel model);
|
||||||
|
|
||||||
|
ManagerViewModel? Update(ManagerBindingModel model);
|
||||||
|
|
||||||
|
ManagerViewModel? Delete(ManagerBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -1,21 +0,0 @@
|
|||||||
using FurnitureContracts.BindingModels;
|
|
||||||
using FurnitureContracts.SearchModels;
|
|
||||||
using FurnitureContracts.ViewModel;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.StoragesContracts
|
|
||||||
{
|
|
||||||
public interface IRoleStorage
|
|
||||||
{
|
|
||||||
List<RoleViewModel> GetFullList();
|
|
||||||
|
|
||||||
List<RoleViewModel> GetFilteredList(RoleSearchModel model);
|
|
||||||
|
|
||||||
RoleViewModel? GetElement(RoleSearchModel model);
|
|
||||||
|
|
||||||
RoleViewModel? Insert(RoleBindingModel model);
|
|
||||||
|
|
||||||
RoleViewModel? Update(RoleBindingModel model);
|
|
||||||
|
|
||||||
RoleViewModel? Delete(RoleBindingModel model);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,16 @@
|
|||||||
|
using FurnitureFactoryDataModels.Models;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace FurnitureContracts.ViewModel
|
||||||
|
{
|
||||||
|
public class ManagerViewModel : IManagerModel
|
||||||
|
{
|
||||||
|
[DisplayName("Имя пользователя")]
|
||||||
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Логин")]
|
||||||
|
public string Login { get; set; } = string.Empty;
|
||||||
|
public string Password { get; }
|
||||||
|
public string Role { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -16,7 +16,7 @@ namespace FurnitureContracts.ViewModel
|
|||||||
[DisplayName("Статус")]
|
[DisplayName("Статус")]
|
||||||
public string Status { get; set; } = string.Empty;
|
public string Status { get; set; } = string.Empty;
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public int ManagerId { get; set; }
|
||||||
public Dictionary<int, IFurnitureModel> FurnitureId { get; set; }
|
public Dictionary<int, IFurnitureModel> FurnitureId { get; set; }
|
||||||
public Dictionary<int, IHeadsetModel> HeadsetId { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
using FurnitureFactoryDataModels.Models;
|
|
||||||
using System.ComponentModel;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.ViewModel
|
|
||||||
{
|
|
||||||
public class RoleViewModel : IRoleModel
|
|
||||||
{
|
|
||||||
[DisplayName("Название роли")]
|
|
||||||
public string Name { get; set; } = string.Empty;
|
|
||||||
public int Id { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,5 +11,6 @@ namespace FurnitureContracts.ViewModel
|
|||||||
public string Address { get; set; } = string.Empty;
|
public string Address { get; set; } = string.Empty;
|
||||||
public Dictionary<int, IOrdersModel> OrdersId { get; set; }
|
public Dictionary<int, IOrdersModel> OrdersId { get; set; }
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
public int ManagerId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,12 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Implements\" />
|
<Folder Include="Implements\" />
|
||||||
<Folder Include="Models\" />
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\FurnitureContracts\FurnitureContracts.csproj" />
|
||||||
|
<ProjectReference Include="..\FurnitureFactoryDataModels\FurnitureFactoryDataModels.csproj" />
|
||||||
|
<ProjectReference Include="..\FurnitureFactory\FurnitureFactory.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureFactoryDataModels"
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureContracts", "FurnitureContracts\FurnitureContracts.csproj", "{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FurnitureContracts", "FurnitureContracts\FurnitureContracts.csproj", "{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FurnitureDataBaseImplement", "FurnitureDataBaseImplement\FurnitureDataBaseImplement.csproj", "{1EFC8085-D7CE-40ED-B78D-5176861AB618}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -29,10 +27,6 @@ Global
|
|||||||
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Release|Any CPU.Build.0 = Release|Any CPU
|
{E269E4B8-5EAD-4BB2-A8BA-44FE9D202FB6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{1EFC8085-D7CE-40ED-B78D-5176861AB618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{1EFC8085-D7CE-40ED-B78D-5176861AB618}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{1EFC8085-D7CE-40ED-B78D-5176861AB618}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{1EFC8085-D7CE-40ED-B78D-5176861AB618}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -11,5 +11,6 @@ namespace FurnitureFactoryDataModels.Models
|
|||||||
int Cost { get;}
|
int Cost { get;}
|
||||||
string Size { get; }
|
string Size { get; }
|
||||||
public Dictionary<int, IHeadsetModuleModel> HeadsetModuleId { get; }
|
public Dictionary<int, IHeadsetModuleModel> HeadsetModuleId { get; }
|
||||||
|
int ManagerId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ namespace FurnitureFactoryDataModels.Models
|
|||||||
{
|
{
|
||||||
string Style { get;}
|
string Style { get;}
|
||||||
int Cost { get;}
|
int Cost { get;}
|
||||||
int UserID { get;}
|
int ManagerID { get;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,11 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FurnitureFactoryDataModels.Models
|
namespace FurnitureFactoryDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IRoleModel : IId
|
public interface IManagerModel : IId
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string Login { get; }
|
||||||
|
string Password { get; }
|
||||||
|
string Role { get; }
|
||||||
|
string UserName { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,6 +11,6 @@ namespace FurnitureFactoryDataModels.Models
|
|||||||
DateTime Date { get; }
|
DateTime Date { get; }
|
||||||
string Status { get; }
|
string Status { get; }
|
||||||
public Dictionary<int, IFurnitureModel> FurnitureId { get; }
|
public Dictionary<int, IFurnitureModel> FurnitureId { get; }
|
||||||
public Dictionary<int, IHeadsetModel> HeadsetId { get; }
|
int ManagerId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,6 @@ namespace FurnitureFactoryDataModels.Models
|
|||||||
string Name { get; }
|
string Name { get; }
|
||||||
string Address { get; }
|
string Address { get; }
|
||||||
public Dictionary<int, IOrdersModel> OrdersId { get; }
|
public Dictionary<int, IOrdersModel> OrdersId { get; }
|
||||||
|
int ManagerId { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace FurnitureFactoryDataModels.Models
|
|||||||
{
|
{
|
||||||
public interface IUserModel
|
public interface IUserModel
|
||||||
{
|
{
|
||||||
int Login { get;}
|
string Login { get;}
|
||||||
int Password { get; }
|
int Password { get; }
|
||||||
string UserName { get; }
|
string UserName { get; }
|
||||||
int RoleID { get; }
|
int RoleID { get; }
|
||||||
|
Loading…
Reference in New Issue
Block a user