Free cookie consent management tool by TermsFeed Policy Generator

source: branches/1888_OaaS/HeuristicLab.Services.Optimization.Web/Models/AccountModels.cs @ 17366

Last change on this file since 17366 was 8384, checked in by fschoepp, 12 years ago

#1888:

  • Created a project which contains the back-end controller for the Optimization WebSite
  • Added a WCF-back-end-controller which generates all available optimization problems (currently in-memory solution: PlaceholderControllerService.cs)
  • Created a WebRole using ASP.NET MVC 3 for the Optimization Web Site
  • WebSite authenticates users with the HeuristicLab.Authentication membership provider and database
  • WebSite crawls and displays all available optimization scenarios by using the WCF-back-end controller (test with: http://localhost:.../optimization)
File size: 1.9 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel.DataAnnotations;
4using System.Globalization;
5using System.Web.Mvc;
6using System.Web.Security;
7
8namespace HeuristicLab.Services.Optimization.Web.Models {
9
10  public class ChangePasswordModel {
11    [Required]
12    [DataType(DataType.Password)]
13    [Display(Name = "Current password")]
14    public string OldPassword { get; set; }
15
16    [Required]
17    [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
18    [DataType(DataType.Password)]
19    [Display(Name = "New password")]
20    public string NewPassword { get; set; }
21
22    [DataType(DataType.Password)]
23    [Display(Name = "Confirm new password")]
24    [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
25    public string ConfirmPassword { get; set; }
26  }
27
28  public class LogOnModel {
29    [Required]
30    [Display(Name = "User name")]
31    public string UserName { get; set; }
32
33    [Required]
34    [DataType(DataType.Password)]
35    [Display(Name = "Password")]
36    public string Password { get; set; }
37
38    [Display(Name = "Remember me?")]
39    public bool RememberMe { get; set; }
40  }
41
42  public class RegisterModel {
43    [Required]
44    [Display(Name = "User name")]
45    public string UserName { get; set; }
46
47    [Required]
48    [DataType(DataType.EmailAddress)]
49    [Display(Name = "Email address")]
50    public string Email { get; set; }
51
52    [Required]
53    [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
54    [DataType(DataType.Password)]
55    [Display(Name = "Password")]
56    public string Password { get; set; }
57
58    [DataType(DataType.Password)]
59    [Display(Name = "Confirm password")]
60    [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
61    public string ConfirmPassword { get; set; }
62  }
63}
Note: See TracBrowser for help on using the repository browser.