переименовала вьюшки с созданием процедур и препаратов, а еще добавила эту несчастную дату (период) в процедуры

This commit is contained in:
Елена Бакальская 2024-05-01 00:48:45 +04:00
parent c871854d3e
commit 07d7bd6127
9 changed files with 39 additions and 10 deletions

View File

@ -8,5 +8,8 @@ namespace PolyclinicContracts.BindingModels
public int UserId { get; set; } public int UserId { get; set; }
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty;
public DateTime From { get; set; } = DateTime.Now;
public DateTime? To { get; set; }
} }
} }

View File

@ -4,5 +4,7 @@
{ {
public int? Id { get; set; } public int? Id { get; set; }
public string? Name { get; set; } public string? Name { get; set; }
public DateTime? From { get; set; }
public DateTime? To { get; set; }
} }
} }

View File

@ -7,9 +7,17 @@ namespace PolyclinicContracts.ViewModels
{ {
public int Id { get; set; } public int Id { get; set; }
public int UserId { get; set; } public int UserId { get; set; }
[DisplayName("Название процедуры")] [DisplayName("Название процедуры")]
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")] [DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty;
[DisplayName("Дата 'от'")]
public DateTime From { get; set; } = DateTime.Now;
[DisplayName("Дата 'до'")]
public DateTime? To { get; set; } = DateTime.Now;
} }
} }

View File

@ -5,5 +5,7 @@
string Name { get; } string Name { get; }
string Comment { get; } string Comment { get; }
int UserId { get; } int UserId { get; }
DateTime From { get; }
DateTime? To { get; }
} }
} }

View File

@ -16,6 +16,10 @@ namespace PolyclinicDatabaseImplement.Models
[Required] [Required]
public string Name { get; set; } = string.Empty; public string Name { get; set; } = string.Empty;
[Required]
public DateTime From { get; set; } = DateTime.Now;
public DateTime? To { get; set; }
[Required] [Required]
public string Comment { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty;
@ -27,6 +31,8 @@ namespace PolyclinicDatabaseImplement.Models
UserId = bindingModel.UserId, UserId = bindingModel.UserId,
Name = bindingModel.Name, Name = bindingModel.Name,
Comment = bindingModel.Comment, Comment = bindingModel.Comment,
From = bindingModel.From,
To = bindingModel.To,
}; };
} }
@ -42,6 +48,8 @@ namespace PolyclinicDatabaseImplement.Models
Name = Name, Name = Name,
UserId = UserId, UserId = UserId,
Comment = Comment, Comment = Comment,
From = From,
To = To,
}; };
} }
} }

View File

@ -0,0 +1,8 @@
@using PolyclinicContracts.ViewModels
@model List<RecipeViewModel>
@{
ViewData["Title"] = "CreateRecipe";
}
<div class="text-center mt-3 mb-3">
<h2 class="display-4">Создание рецепта</h2>
</div>

View File

@ -1,5 +0,0 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

View File

@ -0,0 +1,8 @@
@using PolyclinicContracts.ViewModels
@model List<ProcedureViewModel>
@{
ViewData["Title"] = "CreateRecipe";
}
<div class="text-center mt-3 mb-3">
<h2 class="display-4">Создание рецепта</h2>
</div>

View File

@ -1,5 +0,0 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}