-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
imnapo
committed
Dec 26, 2018
1 parent
cd8e15b
commit 7e7ded9
Showing
12 changed files
with
513 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace cn_react_dotnetcore.Core.Services | ||
{ | ||
public class FileEmailSender : IEmailSender | ||
{ | ||
public Task SendEmailAsync(string email, string subject, string message) | ||
{ | ||
var emailMessage = $"To: {email}\nSubject: {subject}\nMessage: {message}\n\n"; | ||
|
||
File.AppendAllText("emails.html", emailMessage); | ||
|
||
return Task.FromResult(0); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace cn_react_dotnetcore.Core.Services | ||
{ | ||
public interface IEmailSender | ||
{ | ||
Task SendEmailAsync(string email, string subject, string message); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace cn_react_dotnetcore.ViewModels | ||
{ | ||
public class ChangePasswordViewModel | ||
{ | ||
public string OldPassword { get; set; } | ||
|
||
public string NewPassword { get; set; } | ||
|
||
public string ConfirmPassword { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace cn_react_dotnetcore.ViewModels | ||
{ | ||
public class ResetPasswordViewModel | ||
{ | ||
public string FullName { get; set; } | ||
|
||
public bool HasError { get; set; } | ||
|
||
[Required] | ||
[EmailAddress] | ||
public string Email { get; set; } | ||
|
||
|
||
[Required] | ||
[StringLength(4)] | ||
[RegularExpression(@"\d{4}")] | ||
public string EmployeeNo { get; set; } | ||
|
||
[Required] | ||
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)] | ||
[DataType(DataType.Password)] | ||
public string Password { get; set; } | ||
|
||
[DataType(DataType.Password)] | ||
[Display(Name = "Confirm password")] | ||
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] | ||
public string ConfirmPassword { get; set; } | ||
|
||
public string Code { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.