public JsonResult GetAllResources(bool getAllResources) { _logger.Log("Nomination-GetAllResources-POST"); var allResources = new List <User>(); if (getAllResources) { allResources = _nominationService.GetAllResources(); } return(Json(allResources, JsonRequestBehavior.AllowGet)); }
public ActionResult GetEmailTemplate(int processId) { var emailTemplate = _emailTemplateService.GetEmailTemplate(processId); var emailTemplateEditor = new EmailTemplateEditorViewModel { EmailTemplate = emailTemplate.Template }; var allEmployees = _nominationService.GetAllResources().OrderBy(x => x.DisplayName).ToList(); allEmployees.ForEach(x => emailTemplateEditor.Users.Add(new UserViewModel() { UserId = x.ID, Email = x.EmailAddress, Name = x.DisplayName }) ); return(PartialView("~/Views/Email/Shared/_emailTemplateEditor.cshtml", emailTemplateEditor)); }