-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start work on dropdown for user profile Admin can promote team leader
- Loading branch information
Showing
8 changed files
with
175 additions
and
23 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
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 @@ | ||
@model LanAdept.Views.User.ModelController.UserModel | ||
|
||
@{ | ||
ViewBag.Title = "Index"; | ||
} | ||
|
||
<h2>Mon profil</h2> | ||
|
||
@Html.DisplayFor(model => model.CompleteName) | ||
@Html.DisplayFor(model => model.Email) |
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 LanAdept.Views.User.ModelController; | ||
using LanAdeptCore.Service; | ||
using LanAdeptData.DAL; | ||
using LanAdeptData.Model.Users; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
using System.Web.Mvc; | ||
|
||
namespace LanAdept.Controllers | ||
{ | ||
public class UserController : Controller | ||
{ | ||
private UnitOfWork uow | ||
{ | ||
get { return UnitOfWork.Current; } | ||
} | ||
|
||
[AllowAnonymous] | ||
public ActionResult Index() | ||
{ | ||
User u = UserService.GetLoggedInUser(); | ||
|
||
UserModel um = new UserModel(); | ||
um.CompleteName = u.CompleteName; | ||
um.Email = u.Email; | ||
um.UserId = u.Id; | ||
|
||
return View(um); | ||
} | ||
} | ||
} |
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; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace LanAdept.Views.User.ModelController | ||
{ | ||
public class UserModel | ||
{ | ||
public string UserId { get; set; } | ||
[Required] | ||
public string CompleteName { get; set; } | ||
[Required] | ||
public string Email { 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
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