я умный, я умный, я дурак

This commit is contained in:
Whoisthatjulia 2024-04-28 20:43:33 +04:00
parent fe336f3387
commit 46f8a36526
9 changed files with 85 additions and 12 deletions

View File

@ -3,10 +3,20 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankDataModels.ProxyModels;
using BankDataModels;
namespace BankContracts.BindingModels
{
internal class CostBindingModel
public class CostBindingModel : ICostModel
{
public int EmployeeId { get; set; }
public string NameOfCost { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, CostByPurchaseModel> PurchasesModels { get; set; } = new();
public int Id { get; set; }
}
}

View File

@ -3,10 +3,27 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankDataModels;
namespace BankContracts.BindingModels
{
internal class EmployeeBindingModel
public class EmployeeBindingModel : IEmployeeModel
{
public string Post { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string? MiddleName { get; set; }
public string PhoneNumber { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public int Id { get; set; }
public string Email { get; set; } = string.Empty;
}
}

View File

@ -3,10 +3,20 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankDataModels;
namespace BankContracts.BindingModels
{
internal class OperationBindingModel
public class OperationBindingModel : IOperationModel
{
public string Model { get; set; } = string.Empty;
public string Mark { get; set; } = string.Empty;
public double Price { get; set; }
public int Id { get; set; }
public int EmployeeId { get; set; }
}
}

View File

@ -3,10 +3,15 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankContracts.BindingModels;
using BankContracts.SearchModels;
using BankContracts.ViewModels;
namespace BankContracts.BusinessLogicContracts
{
internal class IEmployeeLogic
public interface IEmployeeLogic
{
EmployeeViewModel ReadElement(EmployeeSearchModel model);
bool Create(EmployeeBindingModel model);
}
}

View File

@ -3,10 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
internal class CostSearchModel
public class CostSearchModel
{
public int? Id { get; set; }
public int? EmployeeId { get; set; }
}
}

View File

@ -3,10 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
internal class EmployeeSearchModel
public class EmployeeSearchModel
{
public int? Id { get; set; }
public string? PhoneNumber { get; set; }
public string? Password { get; set; }
}
}

View File

@ -3,10 +3,15 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankContracts.SearchModels
{
internal class OperationSearchModel
public class OperationSearchModel
{
public int? Id { get; set; }
public int? EmployeeId { get; set; }
public string Model { get; set; } = string.Empty;
public string Mark { get; set; } = string.Empty;
public int Price { get; set; }
public List<int>? PurchasesIds { get; set; }
}
}

View File

@ -3,10 +3,16 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankContracts.BindingModels;
using BankContracts.SearchModels;
using BankContracts.ViewModels;
namespace BankContracts.StoragesContracts
{
internal class IEmployeeStorage
public interface IEmployeeStorage
{
EmployeeViewModel? GetElement(EmployeeSearchModel model);
EmployeeViewModel? Insert(EmployeeBindingModel model);
}
}

View File

@ -3,10 +3,26 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BankDataModels;
using System.ComponentModel;
namespace BankContracts.ViewModels
{
internal class EmployeeViewModel
public class EmployeeViewModel : IEmployeeModel
{
public int Id { get; set; }
[DisplayName("Фамилия")]
public string LastName { get; set; } = string.Empty;
[DisplayName("Имя")]
public string FirstName { get; set; } = string.Empty;
[DisplayName("Отчество")]
public string? MiddleName { get; set; } = string.Empty;
[DisplayName("Номер телефона")]
public string PhoneNumber { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Должность")]
public string Post { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}
}