правки по результатм работы
This commit is contained in:
parent
34ff70b8ca
commit
9d68f31846
@ -10,6 +10,7 @@ namespace DatabaseCore.Models.Department
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[EntityDescription("Classroom", "Аудитрия кафедры")]
|
||||
[EntityDependency("Employee", "EmployeeId", "Сотрудник, отвечающий за аудиторию")]
|
||||
public class Classroom : BaseEntity, IEntitySecurityExtenstion<Classroom>
|
||||
{
|
||||
[DataMember]
|
||||
|
@ -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; }
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user