Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.ComponentModel.DataAnnotations;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
|
---|
8 | {
|
---|
9 | /// <summary>
|
---|
10 | /// Used for login
|
---|
11 | /// </summary>
|
---|
12 | public class LoginViewModel
|
---|
13 | {
|
---|
14 | /// <summary>
|
---|
15 | /// Used only for the WebHive. Identifies logged in users.
|
---|
16 | /// </summary>
|
---|
17 | public Guid userId { get; set; }
|
---|
18 | /// <summary>
|
---|
19 | /// Login name from the user
|
---|
20 | /// </summary>
|
---|
21 | [Display(Name = "Username")]
|
---|
22 | public string loginName { get; set; }
|
---|
23 | /// <summary>
|
---|
24 | /// Encrypted password
|
---|
25 | /// </summary>
|
---|
26 | [Display(Name = "Password")]
|
---|
27 | public string password { get; set; }
|
---|
28 |
|
---|
29 | public string errorMessage { get; set; }
|
---|
30 | /// <summary>
|
---|
31 | /// Initialize the loginViewModel. Creates a unique Guid for the WebHive
|
---|
32 | /// </summary>
|
---|
33 | /// <param name="n">Login name</param>
|
---|
34 | /// <param name="p">Encrypted password</param>
|
---|
35 | public LoginViewModel(string n, string p)
|
---|
36 | {
|
---|
37 | loginName = n;
|
---|
38 | password = p;
|
---|
39 | userId = Guid.NewGuid();
|
---|
40 | }
|
---|
41 | public LoginViewModel()
|
---|
42 | {
|
---|
43 | userId = Guid.Empty;
|
---|
44 | loginName = "";
|
---|
45 | password = "";
|
---|
46 | }
|
---|
47 | }
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.