public ActionResult AddRoleToUser(Guid userID) { var model = new AddRoleToUserModel(userID); model.UserName = new AccountService(Guid.Parse(UserHelper.GetUserId()), GStorage.Data["UserManager"]).GetUserById(userID).UserName; return(View(model)); }
public RoleService CreateRoleService() => new RoleService(Guid.Parse(UserHelper.GetUserId()));
public UserRoleService CreateUserRoleService() => new UserRoleService(Guid.Parse(UserHelper.GetUserId()), GStorage.Data["UserManager"]);
public ActionResult Create(PromotionCreate model) { if (!ModelState.IsValid) { return(View(model)); } var svc = CreatePromotionService(); if (svc.CreatePromotion(model)) { TempData["SaveResult"] = "Your PlanItem was promoted."; return(RedirectToAction("Details", "Project", new { id = new PlanItemService(Guid.Parse(UserHelper.GetUserId())).GetProjectIdFor(model.PlanId) })); } return(View(model)); }
public ActionResult Create(Guid planItemId) { var model = new PromotionCreate(new PlanItemService(Guid.Parse(UserHelper.GetUserId())).GetPlanItemById(planItemId)); return(View(model)); }
// GET: Promotion public ActionResult Index(Guid planId) { var model = CreatePromotionService().GetPromotionListItems(planId).ToList().Sorted(new PromotionListItem.DateComparer()).ToArray(); return(View(new PromotionListModel(new PlanItemService(Guid.Parse(UserHelper.GetUserId())).GetPlanItemById(planId), model))); }