34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using HospitalDataModels.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.Json.Serialization;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HospitalContracts.ViewModels
|
|
{
|
|
public class ProceduresViewModel: IProceduresModel
|
|
{
|
|
public int Id { get; set; }
|
|
[DisplayName("Название процедуры")]
|
|
public string ProceduresName { get; set; } = string.Empty;
|
|
[DisplayName("Тип процедуры")]
|
|
public string Type { get; set; } = string.Empty;
|
|
public int ClientId { get; set; }
|
|
public Dictionary<int, IMedicinesModel> ProcedureMedicine
|
|
{
|
|
get;
|
|
set;
|
|
} = new();
|
|
|
|
public ProceduresViewModel() { }
|
|
[JsonConstructor]
|
|
public ProceduresViewModel(Dictionary<int, MedicinesViewModel> ProcedureMedicine)
|
|
{
|
|
this.ProcedureMedicine = ProcedureMedicine.ToDictionary(x => x.Key, x => x.Value as IMedicinesModel);
|
|
}
|
|
}
|
|
}
|