Compare commits
2 Commits
6a89dbdbc6
...
95978ac7d3
Author | SHA1 | Date | |
---|---|---|---|
95978ac7d3 | |||
b741fe0072 |
@ -6,14 +6,12 @@ using System.Threading.Tasks;
|
|||||||
using FurnitureFactoryDataModels.Models;
|
using FurnitureFactoryDataModels.Models;
|
||||||
namespace FurnitureContracts.BindingModels
|
namespace FurnitureContracts.BindingModels
|
||||||
{
|
{
|
||||||
public class UserBindingModel : IUserModel
|
public class MasterBindingModel : IMasterModel
|
||||||
{
|
{
|
||||||
public int Login { get; set; }
|
|
||||||
|
|
||||||
public int Password { get; set; }
|
|
||||||
|
|
||||||
public string UserName { get; set; } = string.Empty;
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
public string Login { get; set; } = string.Empty;
|
||||||
public int RoleID { get; set; }
|
public string Password { get; set; } = string.Empty;
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
public int Id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureContracts.BindingModels;
|
||||||
|
using FurnitureContracts.SearchModels;
|
||||||
|
using FurnitureContracts.ViewModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IMasterLogic
|
||||||
|
{
|
||||||
|
List<MasterViewModel>? ReadList(MasterSearchModel? model);
|
||||||
|
MasterViewModel? ReadElement(MasterSearchModel model);
|
||||||
|
bool Create(MasterBindingModel model);
|
||||||
|
bool Update(MasterBindingModel model);
|
||||||
|
bool Delete(MasterBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -1,20 +0,0 @@
|
|||||||
using FurnitureContracts.BindingModels;
|
|
||||||
using FurnitureContracts.SearchModels;
|
|
||||||
using FurnitureContracts.ViewModel;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.BusinessLogicsContracts
|
|
||||||
{
|
|
||||||
interface IUserLogic
|
|
||||||
{
|
|
||||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
|
||||||
UserViewModel? ReadElement(UserSearchModel model);
|
|
||||||
bool Create(UserBindingModel model);
|
|
||||||
bool Update(UserBindingModel model);
|
|
||||||
bool Delete(UserBindingModel model);
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FurnitureContracts.SearchModels
|
namespace FurnitureContracts.SearchModels
|
||||||
{
|
{
|
||||||
public class UserSearchModel
|
public class MasterSearchModel
|
||||||
{
|
{
|
||||||
public string? Name { get; set; }
|
public string? Name { 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 IMasterStorage
|
||||||
|
{
|
||||||
|
List<MasterViewModel> GetFullList();
|
||||||
|
|
||||||
|
List<MasterViewModel> GetFilteredList(MasterSearchModel model);
|
||||||
|
|
||||||
|
MasterViewModel? GetElement(MasterSearchModel model);
|
||||||
|
|
||||||
|
MasterViewModel? Insert(MasterBindingModel model);
|
||||||
|
|
||||||
|
MasterViewModel? Update(MasterBindingModel model);
|
||||||
|
|
||||||
|
MasterViewModel? Delete(MasterBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -1,21 +0,0 @@
|
|||||||
using FurnitureContracts.BindingModels;
|
|
||||||
using FurnitureContracts.SearchModels;
|
|
||||||
using FurnitureContracts.ViewModel;
|
|
||||||
|
|
||||||
namespace FurnitureContracts.StoragesContracts
|
|
||||||
{
|
|
||||||
public interface IUserStorage
|
|
||||||
{
|
|
||||||
List<UserViewModel> GetFullList();
|
|
||||||
|
|
||||||
List<UserViewModel> GetFilteredList(UserSearchModel model);
|
|
||||||
|
|
||||||
UserViewModel? GetElement(UserSearchModel model);
|
|
||||||
|
|
||||||
UserViewModel? Insert(UserBindingModel model);
|
|
||||||
|
|
||||||
UserViewModel? Update(UserBindingModel model);
|
|
||||||
|
|
||||||
UserViewModel? Delete(UserBindingModel model);
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,16 +8,15 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FurnitureContracts.ViewModel
|
namespace FurnitureContracts.ViewModel
|
||||||
{
|
{
|
||||||
public class UserViewModel : IUserModel
|
public class MasterViewModel : IMasterModel
|
||||||
{
|
{
|
||||||
[DisplayName("Логин")]
|
[DisplayName("Логин")]
|
||||||
public int Login { get; set; }
|
public string Login { get; set; }
|
||||||
[DisplayName("Пароль")]
|
[DisplayName("Пароль")]
|
||||||
public int Password { get; set; }
|
public string Password { get; set; }
|
||||||
[DisplayName("Имя пользователя")]
|
[DisplayName("Имя пользователя")]
|
||||||
|
public string Email { get; set; }
|
||||||
public string UserName { get; set; } = string.Empty;
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
public int Id { get; set; }
|
||||||
public int RoleID { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
using FurnitureFactoryDataModels.Models;
|
using FurnitureFactoryDataModels.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -9,13 +10,13 @@ namespace FurnitureDataBaseImplement.Models
|
|||||||
{
|
{
|
||||||
public class Material : IMaterialModel
|
public class Material : IMaterialModel
|
||||||
{
|
{
|
||||||
|
[Required]
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[Required]
|
||||||
public int Cost { get; set; }
|
public int Cost { get; set; }
|
||||||
|
[Required]
|
||||||
public int UserID { get; set; }
|
public int UserID { get; set; }
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
using FurnitureFactoryDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FurnitureFactoryDataBaseImplement.Models
|
||||||
|
{
|
||||||
|
public class Material : IMaterialModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int Cost { get; set; }
|
||||||
|
|
||||||
|
public int UserID { get; set; }
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -6,11 +6,11 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace FurnitureFactoryDataModels.Models
|
namespace FurnitureFactoryDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IUserModel
|
public interface IMasterModel : IId
|
||||||
{
|
{
|
||||||
string Login { get; }
|
string Login { get; }
|
||||||
int Password { get; }
|
string Password { get; }
|
||||||
string UserName { get; }
|
string UserName { get; }
|
||||||
int RoleID { get; }
|
string Email { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user