using Neo.Afx.Services.Notifications.Entities; using System.Collections.Generic; using System.Configuration; using Neo.LegitimateLicences.Common.Helpers; namespace Neo.LegitimateLicences.Common.ViewModels { public class ResponsiveAppBaseModel { /// /// The AfxServices path to use for all service related calls /// public string AfxServicePath { get { return ConfigurationManager.AppSettings["AfxServicesPath"].ToString(); } } /// /// The CDN path to the set of Afx Css, images and scripts /// public string AfxCdnPath { get { return ConfigurationManager.AppSettings["AfxCdnPath"].ToString(); } } /// /// The unique ajax request ticket for the request /// public string AjaxRequestTicket { get { return WebHelper.GetQueryStringValue("_", new System.Guid().ToString().Replace("-","")); } } /// /// The logged in user's ID /// public long UserID { get; set; } /// /// The logged in user's set of roles /// public IEnumerable UserRoles { get; set; } /// /// The logged in user's set of securables /// public List UserSecurables { get; set; } /// /// The logged in user's Full Name /// public string UserName { get; set; } /// /// The logged in user's Default printer /// public string DefaultPrinterName { get; set; } /// /// The logged in user's Default Barcode printer /// public string BarcodePrinterName { get; set; } /// /// Specifies if a custom footer will be displayed /// public bool IsCustomFooterVisible { get; set; } /////// /////// Specifies if the activity icon will be visible /////// ////public bool IsActivityVisible ////{ //// get; //// set; ////} /////// /////// Specifies if the notifications icon will be visible /////// ////public bool IsCommentsVisible ////{ //// get; //// set; ////} /////// /////// Specifies if the correspondence icon will be visible /////// ////public bool IsCorrespondenceVisible ////{ //// get; //// set; ////} /////// /////// Specifies if the documents section will be visible /////// ////public bool IsDocumentsVisible ////{ //// get; //// set; ////} /////// /////// Specifies if the settings icon will be visible /////// ////public bool IsSettingsVisible ////{ //// get; //// set; ////} /// /// Specifies the number of tasks assigned to the current user /// public int MyTaskCount { get; set; } /// /// Specifies if the EntityID if the model is used on a specific entity /// public long EntityID { get { return WebHelper.GetQueryStringValue("entityID", -1); } } /// /// Specifies if the ItemID if the model isused on a speciifc entity /// public long ItemID { get { return WebHelper.GetQueryStringValue("itemID", -1); } } /// /// Specifies if the taskID if the model is used on a workflow form /// private long? _taskID; public long TaskID { get { if (!_taskID.HasValue) { return WebHelper.GetQueryStringValue("taskID", -1); } return _taskID.Value; } set { _taskID = value; } } /// /// Specifies if the search at the top left is visible /// ////public bool IsSearchVisible ////{ //// get; //// set; ////} /// /// The logged in user is an Administrator /// public bool UserIsAdministrator { get;set; } /// /// The token used to authenicate user /// public string Token { get; set; } } }