поменяла вью модели и обозначила всем колонкам свойства согласно конструктору класса ColumnAttribute
This commit is contained in:
parent
734a2f2d51
commit
17da7d4304
@ -1,4 +1,5 @@
|
||||
using SushiBarDataModels;
|
||||
using SushiBarContracts.Attributes;
|
||||
using SushiBarDataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -10,15 +11,16 @@ namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class ClientViewModel : IClientModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("ФИО Клиента")]
|
||||
[Column(title: "ФИО клиента", width: 200)]
|
||||
public string ClientFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Логин (эл. почта)")]
|
||||
[Column(title: "Логин (эл. почта)", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Пароль")]
|
||||
[Column(title: "Пароль", width: 50)]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,19 @@
|
||||
using System.ComponentModel;
|
||||
using SushiBarContracts.Attributes;
|
||||
using SushiBarDataModels.Models;
|
||||
|
||||
namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class ComponentViewModel : IComponentModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название компонента")]
|
||||
|
||||
|
||||
[Column(title: "Компонент", width: 50)]
|
||||
public string ComponentName { get; set; } = string.Empty;
|
||||
[DisplayName("Цена")]
|
||||
|
||||
|
||||
[Column(title: "Цена", width: 30)]
|
||||
public double Cost { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using SushiBarDataModels;
|
||||
using SushiBarContracts.Attributes;
|
||||
using SushiBarDataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -10,17 +11,19 @@ namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class ImplementerViewModel : IImplementerModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Исполнитель ФИО")]
|
||||
|
||||
[Column(title: "Исполнитель ФИО", width: 150)]
|
||||
public string ImplementerFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Пароль")]
|
||||
[Column(title: "Пароль", width: 50)]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Опыт работы")]
|
||||
[Column(title: "Опыт работы", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public int WorkExperience { get; set; }
|
||||
|
||||
[DisplayName("Квалификация")]
|
||||
[Column(title: "Квалификация", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public int Qualification { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using SushiBarDataModels;
|
||||
using SushiBarContracts.Attributes;
|
||||
using SushiBarDataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -11,20 +12,24 @@ namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class MessageInfoViewModel : IMessageInfoModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public string MessageId { get; set; } = string.Empty;
|
||||
|
||||
[Column(visible: false)]
|
||||
public int? ClientId { get; set; }
|
||||
|
||||
[DisplayName("Имя отправителя")]
|
||||
[Column(title: "Имя отправителя", width: 200)]
|
||||
public string SenderName { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Дата получения")]
|
||||
[Column(title: "Дата получения", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now;
|
||||
|
||||
[DisplayName("Тема письма")]
|
||||
|
||||
[Column(title: "Тема письма", width: 150)]
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Душа письма...")]
|
||||
|
||||
[Column(title: "Душа письма...", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public string Body { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -2,45 +2,50 @@
|
||||
using SushiBarDataModels.Models;
|
||||
using SushiBarDataModels.Enums;
|
||||
using SushiBarDataModels;
|
||||
using SushiBarContracts.Attributes;
|
||||
|
||||
namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class OrderViewModel : IOrderModel
|
||||
{
|
||||
[DisplayName("Номер")]
|
||||
[Column(title: "Номер", width: 10)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(visible: false)]
|
||||
public int SushiId { get; set; }
|
||||
|
||||
[Column(visible: false)]
|
||||
public int ClientId { get; set; }
|
||||
|
||||
[Column(visible: false)]
|
||||
public int? ImplementerId { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Имя клиента")]
|
||||
[Column(title: "Имя клиента", width: 150)]
|
||||
public string ClientFIO { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Имя исполнителя")]
|
||||
|
||||
[Column(title: "Имя исполнителя", width: 150)]
|
||||
public string? ImplementerFIO { get; set; }
|
||||
|
||||
[DisplayName("Суши")]
|
||||
[Column(title: "Суши", width: 50)]
|
||||
public string SushiName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
[DisplayName("Количество")]
|
||||
[Column(title: "Количество", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public int Count { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Сумма")]
|
||||
[Column(title: "Сумма", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public double Sum { get; set; }
|
||||
|
||||
|
||||
[DisplayName("Статус")]
|
||||
[Column(title: "Статус", width: 30)]
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||
|
||||
|
||||
[DisplayName("Дата создания")]
|
||||
[Column(title: "Дата создания", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
[DisplayName("Дата выполнения")]
|
||||
[Column(title: "Дата выполнения", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
}
|
||||
}
|
@ -1,18 +1,18 @@
|
||||
using System.ComponentModel;
|
||||
using SushiBarContracts.Attributes;
|
||||
using SushiBarDataModels.Models;
|
||||
|
||||
namespace SushiBarContracts.ViewModels
|
||||
{
|
||||
public class SushiViewModel : ISushiModel
|
||||
{
|
||||
[Column(visible: false)]
|
||||
public int Id { get; set; }
|
||||
[DisplayName("Название изделия")]
|
||||
|
||||
|
||||
[Column(title: "Название изделия", width: 50)]
|
||||
public string SushiName { get; set; } = string.Empty;
|
||||
[DisplayName("Цена")]
|
||||
|
||||
|
||||
[Column(title: "Цена", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
||||
public double Price { get; set; }
|
||||
public Dictionary<int, (IComponentModel, int)> SushiComponents
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user