контракты клиента
This commit is contained in:
parent
e1902ba03a
commit
2a6e1b67f3
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace VetclinicDataModels.Models
|
||||
{
|
||||
public interface IMedPurchase: IId
|
||||
public interface IDrugPurchase: IId
|
||||
{
|
||||
int ClientId { get; }
|
||||
double Cost { get; }
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicDataModels.Models;
|
||||
|
||||
namespace VetclinicContracts.BindingModels
|
||||
{
|
||||
public class ClientBindingModel: IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ClientName { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicContracts.BindingModels;
|
||||
using VetclinicContracts.SearchModels;
|
||||
|
||||
namespace VetclinicContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IClientLogic
|
||||
{
|
||||
List<ClientViewModel>? ReadList(ClientSearchModel? model);
|
||||
ClientViewModel? ReadElement(ClientSearchModel model);
|
||||
bool Create(ClientBindingModel model);
|
||||
bool Update(ClientBindingModel model);
|
||||
bool Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicDataModels.Models;
|
||||
|
||||
namespace VetclinicContracts.SearchModels
|
||||
{
|
||||
public class ClientSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? ClientName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Password { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicContracts.BindingModels;
|
||||
using VetclinicContracts.SearchModels;
|
||||
using VetclinicContracts.ViewModels;
|
||||
|
||||
namespace VetclinicContracts.StoragesContracts
|
||||
{
|
||||
public interface IClientStorage
|
||||
{
|
||||
List<ClientViewModel> GetFullList();
|
||||
List<ClientViewModel> GetFiltredList(ClientSearchModel model);
|
||||
ClientViewModel? GetElement(ClientSearchModel model);
|
||||
ClientViewModel? Insert(ClientBindingModel model);
|
||||
ClientViewModel? Update(ClientBindingModel model);
|
||||
ClientViewModel? Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -6,4 +6,8 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Vetclinic\VetclinicDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
21
Vetclinic/VetclinicContracts/ViewModels/ClientViewModel.cs
Normal file
21
Vetclinic/VetclinicContracts/ViewModels/ClientViewModel.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VetclinicDataModels.Models;
|
||||
|
||||
namespace VetclinicContracts.ViewModels
|
||||
{
|
||||
public class ClientViewModel: IClientModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DisplayName("ФИО клиента")]
|
||||
public string ClientName { get; set; } = string.Empty;
|
||||
[DisplayName("Логин (эл. почта)")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
[DisplayName("Пароль")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user