using System.Web.Mvc; using System.Web.UI; using Neo.Afx.Security; using System; using System.Configuration; using System.Web.Profile; using System.Linq; using Neo.LegitimateLicences.Common; using System.Web.Security; using Neo.Afx.Services.Audits; using Neo.LegitimateLicences.Common.ViewModels; using Neo.LegitimateLicences.Common.Helpers; using Neo.Afx.Services.Workflows; namespace Neo.LegitimateLicences.Web.Controllers { [Authorize] public partial class AfxController : Neo.LegitimateLicences.Common.ControllerBase { #region Comments public ActionResult Comments(bool showBack = false) { return View("~/Views/Shared/Afx/Comments/List.cshtml", GetApplicationCommentsModel(showBack)); } #endregion #region GetApplicationCommentsModel protected ResponsiveAppWorkflowModel GetApplicationCommentsModel(bool showBack) { if (WebHelper.ItemID == -1) { return new ResponsiveAppWorkflowModel(); } var model = new ResponsiveAppWorkflowModel { UserID = Profile.UserID, UserRoles = Profile.Roles }; var wd = new WorkflowsDatabase(); var instance = wd.GetWorkflowInstanceView(model.EntityID, model.ItemID); if (instance != null) { ViewBag.Title = "Comments for " + instance.ReferenceNumber + ", " + instance.WorkflowInstanceDescription; } else { ViewBag.Title = "Comments"; } return model; } #endregion } }