-
-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathAddPersonModel.cs
More file actions
69 lines (60 loc) · 2.04 KB
/
AddPersonModel.cs
File metadata and controls
69 lines (60 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using Microsoft.AspNetCore.Mvc.Rendering;
using Resgrid.Framework;
using Resgrid.Model;
using Resgrid.Model.Identity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Resgrid.Web.Areas.User.Models
{
public class AddPersonModel: BaseUserModel
{
public string UdfFormHtml { get; set; }
public Department Department { get; set; }
public IdentityUser User { get; set; }
public UserProfile Profile { get; set; }
public MobileCarriers Carrier { get; set; }
public int UserGroup { get; set; }
public bool IsUserGroupAdmin { get; set; }
public string UserId { get; set; }
public List<PersonnelRole> UsersRoles { get; set; }
public SelectList Groups { get; set; }
public string GroupName { get; set; }
public bool GroupAdmin { get; set; }
public bool IsGroupAdminAdding { get; set; }
[Required]
[MaxLength(50)]
[Display(Name = "User name", Description = "You must supply a username.")]
public string Username { get; set; }
[Required]
[MaxLength(50)]
[Display(Name = "First name")]
public string FirstName { get; set; }
[Required]
[MaxLength(50)]
[Display(Name = "Last name")]
public string LastName { get; set; }
[Required]
[MaxLength(150)]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[StringLength(100, ErrorMessage = "The password must be at least 8 characters long", MinimumLength = 8)]
[PasswordComplexity(
MinLength = 8,
RequireUppercase = true,
RequireLowercase = true,
RequireDigit = true,
RequireSpecialChar = false)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
[Required]
public string NewPassword { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm Password")]
[System.ComponentModel.DataAnnotations.Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
[Required]
public string ConfirmPassword { get; set; }
public bool SendAccountCreationNotification { get; set; }
public bool MustChangePasswordOnLogin { get; set; }
}
}