Upload files to 'ShipyardContracts/ViewModels'

This commit is contained in:
Ivan_Starostin 2024-06-21 21:49:23 +04:00
parent 789d3b3627
commit c09f3d4822
5 changed files with 59 additions and 42 deletions

View File

@ -1,4 +1,5 @@
using ShipyardDataModels;
using ShipyardContracts.Attributes;
using ShipyardDataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -10,12 +11,14 @@ namespace ShipyardContracts.ViewModels
{
public class ClientViewModel : IClientModel
{
public int Id { get; set; }
[DisplayName("ФИО клиента")]
public string ClientFIO { get; set; } = string.Empty;
[DisplayName("Логин (эл. почта)")]
public string Email { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
}
[Column(visible: false)]
public int Id { get; set; }
[Column(title: "ФИО клиента", width: 150)]
public string ClientFIO { get; set; } = string.Empty;
[Column(title: "Email клиента", gridViewAutoSize: GridViewAutoSize.Fill,
isUseAutoSize: true)]
public string Email { get; set; } = string.Empty;
[Column(title: "Пароль", width: 150)]
public string Password { get; set; } = string.Empty;
}
}

View File

@ -1,13 +1,15 @@
using ShipyardDataModels.Models;
using ShipyardContracts.Attributes;
using ShipyardDataModels.Models;
using System.ComponentModel;
namespace ShipyardContracts.ViewModels
{
public class ComponentViewModel : IComponentModel
{
public int Id { get; set; }
[DisplayName("Название компонента")]
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Cost { get; set; }
}
[Column(visible: false)]
public int Id { get; set; }
[Column(title: "Название компонента", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
public string ComponentName { get; set; } = string.Empty;
[Column(title: "Цена", width: 80)]
public double Cost { get; set; }
}
}

View File

@ -1,4 +1,5 @@
using ShipyardDataModels.Models;
using ShipyardContracts.Attributes;
using ShipyardDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -10,14 +11,18 @@ namespace ShipyardContracts.ViewModels
{
public class ImplementerViewModel : IImplementerModel
{
[Column(visible: false)]
public int Id { get; set; }
[DisplayName("ФИО исполнителя")]
[Column(title: "ФИО исполнителя", gridViewAutoSize: GridViewAutoSize.Fill,
isUseAutoSize: true)]
public string ImplementerFIO { get; set; } = string.Empty;
[DisplayName("Стаж работы")]
[Column(title: "Стаж работы", gridViewAutoSize: GridViewAutoSize.AllCells,
isUseAutoSize: true)]
public int WorkExperience { get; set; } = 0;
[DisplayName("Квалификация")]
[Column(title: "Квалификация", gridViewAutoSize: GridViewAutoSize.AllCells,
isUseAutoSize: true)]
public int Qualification { get; set; } = 0;
[DisplayName("Пароль")]
[Column(title: "Пароль", width: 150)]
public string Password { get; set; } = string.Empty;
}
}

View File

@ -1,4 +1,5 @@
using System;
using ShipyardContracts.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
@ -9,19 +10,21 @@ namespace ShipyardContracts.ViewModels
{
public class MessageInfoViewModel
{
[Column(visible: false)]
public string MessageId { get; set; } = string.Empty;
[Column(visible: false)]
public int? ClientId { get; set; }
[DisplayName("Отправитель")]
[Column(title: "Отправитель", gridViewAutoSize: GridViewAutoSize.DisplayedCells,
isUseAutoSize: true)]
public string SenderName { get; set; } = string.Empty;
[DisplayName("Дата письма")]
[Column(title: "Дата письма", width: 100)]
public DateTime DateDelivery { get; set; }
[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;
[Column(visible: false)]
public int Id => throw new NotImplementedException();
}
}

View File

@ -1,18 +1,22 @@
using ShipyardDataModels.Models;
using ShipyardContracts.Attributes;
using ShipyardDataModels.Models;
using System.ComponentModel;
namespace ShipyardContracts.ViewModels
{
public class ShipViewModel : IShipModel
{
public int Id { get; set; }
[DisplayName("Название изделия")]
public string ShipName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ShipComponents
{
get;
set;
} = new();
}
[Column(visible: false)]
public int Id { get; set; }
[Column(title: "Название корабля", gridViewAutoSize: GridViewAutoSize.Fill,
isUseAutoSize: true)]
public string ShipName { get; set; } = string.Empty;
[Column(title: "Цена", width: 100)]
public double Price { get; set; }
[Column(visible: false)]
public Dictionary<int, (IComponentModel, int)> ShipComponents
{
get;
set;
} = new();
}
}