Почти сделан pdf (добавил вспомогательный viewmodel так как C# не умеет в кортежи). Нужно доделать pdf с отправкой на почту и навести красоту (стили, валидацию)
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UniversityModels.Models;
|
|
|
|
namespace UniversityContracts.ViewModels
|
|
{
|
|
public class StudentViewModel : IStudentModel
|
|
{
|
|
public int Id { get; set; }
|
|
public int UserId { get; set; }
|
|
[DisplayName("Имя студента")]
|
|
public string Name { get; set; } = string.Empty;
|
|
[DisplayName("Фамилия студента")]
|
|
public string Surname { get; set; } = string.Empty;
|
|
[DisplayName("Дата рождения студента")]
|
|
public DateTime DateOfBirth { get; set; } = DateTime.Now;
|
|
[DisplayName("Дата поступления")]
|
|
public DateTime DateOfAddmission { get; set; } = DateTime.Now;
|
|
[DisplayName("Статус обучения")]
|
|
public string EducationStatusName { get; set; } = string.Empty;
|
|
public int StudentCard { get; set; }
|
|
public int? EducationStatusId { get; set; }
|
|
|
|
public StudentViewModel() { }
|
|
|
|
public StudentViewModel(IStudentModel model)
|
|
{
|
|
Id = model.Id;
|
|
UserId = model.UserId;
|
|
Name = model.Name;
|
|
Surname = model.Surname;
|
|
DateOfBirth = model.DateOfBirth;
|
|
StudentCard = model.StudentCard;
|
|
EducationStatusId = model.EducationStatusId;
|
|
}
|
|
}
|
|
}
|