using Neo.Afx.ComponentModel; using Neo.Afx.Mvc; using Neo.Afx.Security; using Neo.Afx.Services.Notifications.Entities; using Neo.LegitimateLicences.AccreditationCancelRequest.Models.Database; using Neo.LegitimateLicences.Common; using Neo.LegitimateLicences.Common.Helpers; using Neo.LegitimateLicences.Data.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Neo.LegitimateLicences.AccreditationCancelRequest { public partial class AccreditationCancelRequestController { #region Dashboard public ActionResult Dashboard() { var isNew = WebHelper.ItemID == -1; var itemId = WebHelper.ItemID; ////var activeUserTask = WorkflowHelper.GetActiveUserTask(Profile.UserID, Entity.Application, itemId); var model = new AccreditationCancelRequestDashboardModel { UserSecurables = (Profile.Securables != null) ? Profile.Securables.ToList() : new List() }; if (!isNew) { model.WorkflowInstance = WorkflowHelper.GetWorkflowInstanceView(WebHelper.EntityID, WebHelper.ItemID, Profile.UserID); #region Comments model.Comments = CommentHelper.GetLatestComments(WebHelper.EntityID, WebHelper.ItemID); #endregion } return View("Dashboard", model); } #endregion } }