отображение колонок
This commit is contained in:
parent
596f77bcb9
commit
8d048df15b
@ -94,15 +94,21 @@ namespace FishFactoryBusinessLogic.BusinessLogic
|
|||||||
throw new ArgumentNullException(nameof(element));
|
throw new ArgumentNullException(nameof(element));
|
||||||
}
|
}
|
||||||
|
|
||||||
model.CannedId = element.CannedId;
|
if (element.ImplementerId != null && model.ImplementerId != null && model.ImplementerId != element.ImplementerId)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException(nameof(model.ImplementerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
model.CannedId = element.CannedId;
|
||||||
model.ClientId = element.ClientId;
|
model.ClientId = element.ClientId;
|
||||||
model.DateCreate = element.DateCreate;
|
model.DateCreate = element.DateCreate;
|
||||||
model.DateImplement = element.DateImplement;
|
model.DateImplement = element.DateImplement;
|
||||||
model.Status = element.Status;
|
model.Status = element.Status;
|
||||||
model.Count = element.Count;
|
model.Count = element.Count;
|
||||||
model.Sum = element.Sum;
|
model.Sum = element.Sum;
|
||||||
|
model.ImplementerId = element.ImplementerId.HasValue ? element.ImplementerId : model.ImplementerId;
|
||||||
|
|
||||||
if (model.Status != orderStatus - 1)
|
if (model.Status != orderStatus - 1)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("Status update to " + orderStatus + " operation failed");
|
_logger.LogWarning("Status update to " + orderStatus + " operation failed");
|
||||||
return false;
|
return false;
|
||||||
|
@ -4,7 +4,7 @@ namespace FishFactoryContracts.SearchModels
|
|||||||
public class ImplementerSearchModel
|
public class ImplementerSearchModel
|
||||||
{
|
{
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
public string? ImplementerFIO { get; set; }
|
public string? ImplementerFIO { get; set; } = string.Empty;
|
||||||
public string? Password { get; set; }
|
public string? Password { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
using FishFactoryDataModel.Models;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace FishFactoryContracts.ViewModels
|
namespace FishFactoryContracts.ViewModels
|
||||||
{
|
{
|
||||||
public class ImplementerViewModel
|
public class ImplementerViewModel : IImplementerModel
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
[DisplayName("ФИО исполнителя")]
|
[DisplayName("ФИО исполнителя")]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using FishFactoryContracts.BindingModels;
|
using FishFactoryContracts.BindingModels;
|
||||||
using FishFactoryContracts.ViewModels;
|
using FishFactoryContracts.ViewModels;
|
||||||
using FishFactoryDataModel.Models;
|
using FishFactoryDataModel.Models;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace FishFactoryDatabaseImplement.Models
|
namespace FishFactoryDatabaseImplement.Models
|
||||||
@ -8,14 +9,14 @@ namespace FishFactoryDatabaseImplement.Models
|
|||||||
public class Implementer : IImplementerModel
|
public class Implementer : IImplementerModel
|
||||||
{
|
{
|
||||||
public int Id { get; private set; }
|
public int Id { get; private set; }
|
||||||
|
[Required]
|
||||||
public string ImplementerFIO { get; private set; } = string.Empty;
|
public string ImplementerFIO { get; private set; } = string.Empty;
|
||||||
|
[Required]
|
||||||
public string Password { get; private set; } = string.Empty;
|
public string Password { get; private set; } = string.Empty;
|
||||||
|
[Required]
|
||||||
public int WorkExperience { get; private set; } = 0;
|
public int WorkExperience { get; private set; } = 0;
|
||||||
|
[Required]
|
||||||
public int Qualification { get; private set; } = 0;
|
public int Qualification { get; private set; } = 0;
|
||||||
[ForeignKey("ImplementerId")]
|
[ForeignKey("ImplementerId")]
|
||||||
public virtual List<Order> Order { get; set; } = new();
|
public virtual List<Order> Order { get; set; } = new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user