aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Insights/InsightsStatus.cs
blob: 0bae23b1f094c870ec2c0448cdd3cfbe463d3e4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using LiteDB;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Integration.Operation;

namespace Tango.Insights
{
    public class InsightsStatus
    {
        [BsonId(true)]
        [JsonIgnore]
        public int Id { get; set; }
        public DateTime Time { get; set; }
        public MachineStatuses Status { get; set; }
    }
}
span> public class UserRoleToBooleanConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var user = value as User; if (user != null && parameter != null) { Roles role; if (Enum.TryParse<Roles>(parameter.ToString(),out role)) { if (user.HasRole(role)) { return true; } } } return false; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }