add searchmodels, edit storages

This commit is contained in:
revengel66 2024-07-24 21:04:21 +03:00
parent 9fb4943f9b
commit f64f29a84b
36 changed files with 248 additions and 118 deletions

View File

@ -4,10 +4,10 @@ namespace BeautySalonContracts.BindingModels
public class ClientBindingModel public class ClientBindingModel
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
} }
} }

View File

@ -4,7 +4,7 @@ namespace BeautySalonContracts.BindingModels
public class CosmeticBindingModel public class CosmeticBindingModel
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public double Price { get; set; } public double Price { get; set; }
} }
} }

View File

@ -5,10 +5,10 @@ namespace BeautySalonContracts.BindingModels
public class EmployeeBindingModel public class EmployeeBindingModel
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
} }
} }

View File

@ -4,8 +4,8 @@ namespace BeautySalonContracts.BindingModels
public class ProcedureBindingModel public class ProcedureBindingModel
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public double Price { get; set; } public double Price { get; set; }
public string? FIO_Master { get; set; } public string FIO_Master { get; set; } = string.Empty;
} }
} }

View File

@ -0,0 +1,9 @@

namespace BeautySalonContracts.SearchModels
{
public class ClientSearchModel
{
public int? Id { get; set; }
public string? Login { get; set; }
}
}

View File

@ -0,0 +1,9 @@

namespace BeautySalonContracts.SearchModels
{
public class CosmeticSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,8 @@

namespace BeautySalonContracts.SearchModels
{
public class DistributionSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,10 @@

namespace BeautySalonContracts.SearchModels
{
public class EmployeeSearchModel
{
public int? Id { get; set; }
public string? Login { get; set; }
}
}

View File

@ -0,0 +1,9 @@

namespace BeautySalonContracts.SearchModels
{
public class ProcedureSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,8 @@

namespace BeautySalonContracts.SearchModels
{
public class PurchaseSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,8 @@

namespace BeautySalonContracts.SearchModels
{
public class ReceiptSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,8 @@

namespace BeautySalonContracts.SearchModels
{
public class VisitSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -6,8 +7,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IClientStorage public interface IClientStorage
{ {
List<ClientViewModel> GetFullList(); List<ClientViewModel> GetFullList();
List<ClientViewModel> GetFilteredList(ClientBindingModel model); List<ClientViewModel> GetFilteredList(ClientSearchModel model);
ClientViewModel GetElement(ClientBindingModel model); ClientViewModel GetElement(ClientSearchModel model);
ClientViewModel Insert(ClientBindingModel model); ClientViewModel Insert(ClientBindingModel model);
ClientViewModel Update(ClientBindingModel model); ClientViewModel Update(ClientBindingModel model);
ClientViewModel Deleted(ClientBindingModel model); ClientViewModel Deleted(ClientBindingModel model);

View File

@ -1,5 +1,6 @@
 
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -8,11 +9,11 @@ namespace BeautySalonContracts.StorageContracts
public interface ICosmeticStorage public interface ICosmeticStorage
{ {
List<CosmeticViewModel> GetFullList(); List<CosmeticViewModel> GetFullList();
List<CosmeticViewModel> GetFilteredList(CosmeticBindingModel model); List<CosmeticViewModel> GetFilteredList(CosmeticSearchModel model);
CosmeticViewModel GetElement(CosmeticBindingModel model); CosmeticViewModel? GetElement(CosmeticSearchModel model);
CosmeticViewModel Insert(CosmeticBindingModel model); CosmeticViewModel? Insert(CosmeticBindingModel model);
CosmeticViewModel Update(CosmeticBindingModel model); CosmeticViewModel? Update(CosmeticBindingModel model);
CosmeticViewModel Deleted(CosmeticBindingModel model); CosmeticViewModel? Deleted(CosmeticBindingModel model);
} }
} }

View File

@ -1,5 +1,6 @@
 
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -7,8 +8,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IDistributionStorage public interface IDistributionStorage
{ {
List<DistributionViewModel> GetFullList(); List<DistributionViewModel> GetFullList();
List<DistributionViewModel> GetFilteredList(DistributionBindingModel model); List<DistributionViewModel> GetFilteredList(DistributionSearchModel model);
DistributionViewModel GetElement(DistributionBindingModel model); DistributionViewModel GetElement(DistributionSearchModel model);
DistributionViewModel Insert(DistributionBindingModel model); DistributionViewModel Insert(DistributionBindingModel model);
DistributionViewModel Update(DistributionBindingModel model); DistributionViewModel Update(DistributionBindingModel model);
DistributionViewModel Deleted(DistributionBindingModel model); DistributionViewModel Deleted(DistributionBindingModel model);

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -6,8 +7,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IEmployeeStorage public interface IEmployeeStorage
{ {
List<EmployeeViewModel> GetFullList(); List<EmployeeViewModel> GetFullList();
List<EmployeeViewModel> GetFilteredList(EmployeeBindingModel model); List<EmployeeViewModel> GetFilteredList(EmployeeSearchModel model);
EmployeeViewModel GetElement(EmployeeBindingModel model); EmployeeViewModel GetElement(EmployeeSearchModel model);
EmployeeViewModel Insert(EmployeeBindingModel model); EmployeeViewModel Insert(EmployeeBindingModel model);
EmployeeViewModel Update(EmployeeBindingModel model); EmployeeViewModel Update(EmployeeBindingModel model);
EmployeeViewModel Deleted(EmployeeBindingModel model); EmployeeViewModel Deleted(EmployeeBindingModel model);

View File

@ -1,12 +1,13 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
{ {
public interface IProcedureStorage public interface IProcedureStorage
{ {
List<ProcedureViewModel> GetFullList(); List<ProcedureViewModel> GetFullList();
List<ProcedureViewModel> GetFilteredList(ProcedureBindingModel model); List<ProcedureViewModel> GetFilteredList(ProcedureSearchModel model);
ProcedureViewModel GetElement(ProcedureBindingModel model); ProcedureViewModel GetElement(ProcedureSearchModel model);
ProcedureViewModel Insert(ProcedureBindingModel model); ProcedureViewModel Insert(ProcedureBindingModel model);
ProcedureViewModel Update(ProcedureBindingModel model); ProcedureViewModel Update(ProcedureBindingModel model);
ProcedureViewModel Deleted(ProcedureBindingModel model); ProcedureViewModel Deleted(ProcedureBindingModel model);

View File

@ -1,5 +1,6 @@
 
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -7,8 +8,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IPurchaseStorage public interface IPurchaseStorage
{ {
List<PurchaseViewModel> GetFullList(); List<PurchaseViewModel> GetFullList();
List<PurchaseViewModel> GetFilteredList(PurchaseBindingModel model); List<PurchaseViewModel> GetFilteredList(PurchaseSearchModel model);
PurchaseViewModel GetElement(PurchaseBindingModel model); PurchaseViewModel GetElement(PurchaseSearchModel model);
PurchaseViewModel Insert(PurchaseBindingModel model); PurchaseViewModel Insert(PurchaseBindingModel model);
PurchaseViewModel Update(PurchaseBindingModel model); PurchaseViewModel Update(PurchaseBindingModel model);
PurchaseViewModel Deleted(PurchaseBindingModel model); PurchaseViewModel Deleted(PurchaseBindingModel model);

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -6,8 +7,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IReceiptStorage public interface IReceiptStorage
{ {
List<ReceiptViewModel> GetFullList(); List<ReceiptViewModel> GetFullList();
List<ReceiptViewModel> GetFilteredList(ReceiptBindingModel model); List<ReceiptViewModel> GetFilteredList(ReceiptSearchModel model);
ReceiptViewModel GetElement(ReceiptBindingModel model); ReceiptViewModel GetElement(ReceiptSearchModel model);
ReceiptViewModel Insert(ReceiptBindingModel model); ReceiptViewModel Insert(ReceiptBindingModel model);
ReceiptViewModel Update(ReceiptBindingModel model); ReceiptViewModel Update(ReceiptBindingModel model);
ReceiptViewModel Deleted(ReceiptBindingModel model); ReceiptViewModel Deleted(ReceiptBindingModel model);

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
namespace BeautySalonContracts.StorageContracts namespace BeautySalonContracts.StorageContracts
@ -6,8 +7,8 @@ namespace BeautySalonContracts.StorageContracts
public interface IVisitStorage public interface IVisitStorage
{ {
List<VisitViewModel> GetFullList(); List<VisitViewModel> GetFullList();
List<VisitViewModel> GetFilteredList(VisitBindingModel model); List<VisitViewModel> GetFilteredList(VisitSearchModel model);
VisitViewModel GetElement(VisitBindingModel model); VisitViewModel GetElement(VisitSearchModel model);
VisitViewModel Insert(VisitBindingModel model); VisitViewModel Insert(VisitBindingModel model);
VisitViewModel Update(VisitBindingModel model); VisitViewModel Update(VisitBindingModel model);
VisitViewModel Deleted(VisitBindingModel model); VisitViewModel Deleted(VisitBindingModel model);

View File

@ -7,14 +7,14 @@ namespace BeautySalonContracts.ViewModels
{ {
public int Id { get; set; } public int Id { get; set; }
[DisplayName("Имя")] [DisplayName("Имя")]
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
[DisplayName("Фамилия")] [DisplayName("Фамилия")]
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
[DisplayName("Логин")] [DisplayName("Логин")]
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
[DisplayName("Пароль")] [DisplayName("Пароль")]
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
[DisplayName("Телефон")] [DisplayName("Телефон")]
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
} }
} }

View File

@ -7,7 +7,7 @@ namespace BeautySalonContracts.ViewModels
{ {
public int Id { get; set; } public int Id { get; set; }
[DisplayName("Название")] [DisplayName("Название")]
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
[DisplayName("Цена")] [DisplayName("Цена")]
public double Price { get; set; } public double Price { get; set; }
} }

View File

@ -8,14 +8,14 @@ namespace BeautySalonContracts.ViewModels
{ {
public int Id { get; set; } public int Id { get; set; }
[DisplayName("Имя")] [DisplayName("Имя")]
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
[DisplayName("Фамилия")] [DisplayName("Фамилия")]
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
[DisplayName("Логин")] [DisplayName("Логин")]
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
[DisplayName("Пароль")] [DisplayName("Пароль")]
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
[DisplayName("Телефон")] [DisplayName("Телефон")]
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
} }
} }

View File

@ -7,10 +7,10 @@ namespace BeautySalonContracts.ViewModels
{ {
public int Id { get; set; } public int Id { get; set; }
[DisplayName("Название")] [DisplayName("Название")]
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
[DisplayName("Цена")] [DisplayName("Цена")]
public double Price { get; set; } public double Price { get; set; }
[DisplayName("ФИО мастера")] [DisplayName("ФИО мастера")]
public string? FIO_Master { get; set; } public string FIO_Master { get; set; } = string.Empty;
} }
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -12,12 +13,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public ClientViewModel GetElement(ClientBindingModel model) public ClientViewModel GetElement(ClientSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<ClientViewModel> GetFilteredList(ClientBindingModel model) public List<ClientViewModel> GetFilteredList(ClientSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,6 +1,10 @@
using BeautySalonContracts.BindingModels; using System.ComponentModel;
using System.Reflection;
using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
using BeautySalonDatabaseImplement.Models;
using BeautySalonListImplement; using BeautySalonListImplement;
namespace BeautySalonDatabaseImplement.Implements namespace BeautySalonDatabaseImplement.Implements
@ -12,33 +16,75 @@ namespace BeautySalonDatabaseImplement.Implements
{ {
_source = DataListSingleton.GetInstance(); _source = DataListSingleton.GetInstance();
} }
public CosmeticViewModel GetElement(CosmeticBindingModel model) public List<CosmeticViewModel> GetFilteredList(CosmeticSearchModel model)
{ {
foreach(var cosmetic in _source.Cosmetics) var result = new List<CosmeticViewModel>();
if (string.IsNullOrEmpty(model.Name))
{
return result;
} }
foreach (var cosmetic in _source.Cosmetics)
public List<CosmeticViewModel> GetFilteredList(CosmeticBindingModel model)
{ {
throw new NotImplementedException(); if (cosmetic.Name.Contains(model.Name))
{
result.Add(cosmetic.GetViewModel);
}
}
return result;
} }
public List<CosmeticViewModel> GetFullList() public List<CosmeticViewModel> GetFullList()
{ {
throw new NotImplementedException(); var result = new List<CosmeticViewModel>();
foreach (var cosmetic in _source.Cosmetics)
{
result.Add(cosmetic.GetViewModel);
}
return result;
}
public CosmeticViewModel? GetElement(CosmeticSearchModel model)
{
if (string.IsNullOrEmpty(model.Name))
{
return null;
}
foreach(var cosmetic in _source.Cosmetics)
{
if ((!string.IsNullOrEmpty(model.Name) && cosmetic.Name == model.Name) || (cosmetic.Id == model.Id))
{
return cosmetic.GetViewModel;
}
}
return null;
} }
public CosmeticViewModel Insert(CosmeticBindingModel model) public CosmeticViewModel? Insert(CosmeticBindingModel model)
{
model.Id = 1;
foreach (var cosmetic in _source.Cosmetics)
{
if (model.Id == cosmetic.Id)
{
model.Id = cosmetic.Id + 1;
}
}
var newCosmetic = Cosmetic.Create(model);
if (newCosmetic == null)
{
return null;
}
_source.Cosmetics.Add(newCosmetic);
return newComponent.GetViewModel;
}
public CosmeticViewModel? Update(CosmeticBindingModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public CosmeticViewModel Update(CosmeticBindingModel model) public CosmeticViewModel? Deleted(CosmeticBindingModel model)
{
throw new NotImplementedException();
}
public CosmeticViewModel Deleted(CosmeticBindingModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -11,12 +12,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public DistributionViewModel GetElement(DistributionBindingModel model) public DistributionViewModel GetElement(DistributionSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<DistributionViewModel> GetFilteredList(DistributionBindingModel model) public List<DistributionViewModel> GetFilteredList(DistributionSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -11,12 +12,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public EmployeeViewModel GetElement(EmployeeBindingModel model) public EmployeeViewModel GetElement(EmployeeSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<EmployeeViewModel> GetFilteredList(EmployeeBindingModel model) public List<EmployeeViewModel> GetFilteredList(EmployeeSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -11,12 +12,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public ProcedureViewModel GetElement(ProcedureBindingModel model) public ProcedureViewModel GetElement(ProcedureSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<ProcedureViewModel> GetFilteredList(ProcedureBindingModel model) public List<ProcedureViewModel> GetFilteredList(ProcedureSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -11,12 +12,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public PurchaseViewModel GetElement(PurchaseBindingModel model) public PurchaseViewModel GetElement(PurchaseSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<PurchaseViewModel> GetFilteredList(PurchaseBindingModel model) public List<PurchaseViewModel> GetFilteredList(PurchaseSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,4 +1,5 @@
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -11,12 +12,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public ReceiptViewModel GetElement(ReceiptBindingModel model) public ReceiptViewModel GetElement(ReceiptSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<ReceiptViewModel> GetFilteredList(ReceiptBindingModel model) public List<ReceiptViewModel> GetFilteredList(ReceiptSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -1,5 +1,6 @@
 
using BeautySalonContracts.BindingModels; using BeautySalonContracts.BindingModels;
using BeautySalonContracts.SearchModels;
using BeautySalonContracts.StorageContracts; using BeautySalonContracts.StorageContracts;
using BeautySalonContracts.ViewModels; using BeautySalonContracts.ViewModels;
@ -12,12 +13,12 @@ namespace BeautySalonDatabaseImplement.Implements
throw new NotImplementedException(); throw new NotImplementedException();
} }
public VisitViewModel GetElement(VisitBindingModel model) public VisitViewModel GetElement(VisitSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public List<VisitViewModel> GetFilteredList(VisitBindingModel model) public List<VisitViewModel> GetFilteredList(VisitSearchModel model)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@ -8,11 +8,11 @@ namespace BeautySalonDatabaseImplement.Models
public class Client public class Client
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
public static Client? Create(ClientBindingModel model) public static Client? Create(ClientBindingModel model)
{ {

View File

@ -7,7 +7,7 @@ namespace BeautySalonDatabaseImplement.Models
public class Cosmetic public class Cosmetic
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public double Price { get; set; } public double Price { get; set; }
public static Cosmetic? Create(CosmeticBindingModel model) public static Cosmetic? Create(CosmeticBindingModel model)

View File

@ -7,11 +7,11 @@ namespace BeautySalonDatabaseImplement.Models
public class Employee public class Employee
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public string? Surname { get; set; } public string Surname { get; set; } = string.Empty;
public string? Login { get; set; } public string Login { get; set; } = string.Empty;
public string? Password { get; set; } public string Password { get; set; } = string.Empty;
public string? Phone { get; set; } public string Phone { get; set; } = string.Empty;
public static Employee? Create(EmployeeBindingModel model) public static Employee? Create(EmployeeBindingModel model)
{ {
if (model == null) if (model == null)

View File

@ -8,9 +8,9 @@ namespace BeautySalonDatabaseImplement.Models
public class Procedure public class Procedure
{ {
public int Id { get; set; } public int Id { get; set; }
public string? Name { get; set; } public string Name { get; set; } = string.Empty;
public double Price { get; set; } public double Price { get; set; }
public string? FIO_Master { get; set; } public string FIO_Master { get; set; } = string.Empty;
public static Procedure? Create(ProcedureBindingModel model) public static Procedure? Create(ProcedureBindingModel model)
{ {
if (model == null) if (model == null)