правки по результатм работы

This commit is contained in:
kotcheshir73 2021-04-03 14:27:30 +04:00
parent 34ff70b8ca
commit 9d68f31846
4 changed files with 12 additions and 1 deletions

View File

@ -10,6 +10,7 @@ namespace DatabaseCore.Models.Department
/// </summary>
[DataContract]
[EntityDescription("Classroom", "Аудитрия кафедры")]
[EntityDependency("Employee", "EmployeeId", "Сотрудник, отвечающий за аудиторию")]
public class Classroom : BaseEntity, IEntitySecurityExtenstion<Classroom>
{
[DataMember]

View File

@ -52,6 +52,7 @@ namespace DepartmentBusinessLogic.ViewModels
[MapConfiguration("Capacity")]
public int Capacity { get; set; }
[ViewModelControlListProperty("Код безоп.", ColumnWidth = 100)]
[ViewModelControlElementProperty("Код безоп.", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("SecurityCode")]
public string SecurityCode { get; set; }
@ -60,6 +61,9 @@ namespace DepartmentBusinessLogic.ViewModels
[MapConfiguration("HaveProjector")]
public bool HaveProjector { get; set; }
[ViewModelControlListProperty("Есть проектор", ColumnWidth = 80)]
public string IsHaveProjector => HaveProjector ? "Да" : "Нет";
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
[MapConfiguration("Description")]
public string Description { get; set; }

View File

@ -101,7 +101,7 @@ namespace DepartmentDatabaseImplementation.Implementations
var query = context.EmployeePosts.Where(x => !x.IsDeleted).AsQueryable();
query = query.OrderBy(x => x.EmployeePostName);
query = query.OrderBy(x => x.Order);
if (model.PageNumber.HasValue && model.PageSize.HasValue)
{

View File

@ -21,6 +21,12 @@ namespace SecurityDatabaseImplementation.Implementations
{
using var context = DatabaseManager.GetContext;
if (model.Password.IsEmpty())
{
model.Password = "qwerty";
}
model.Password = SecurityManager.GetPasswordHash(model.Password);
var exsistEntity = context.Users.FirstOrDefault(x => x.UserName == model.Login);
if (exsistEntity == null)
{