-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPermission.cs
41 lines (36 loc) · 1.24 KB
/
Permission.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace stationMeteo
{
public class Permission
{
public int ID { get; set; }
public String name { get; set; }
public Boolean allowCreateID { get; set; }
public Boolean allowDestroyID { get; set; }
public Boolean allowConfigAlarm { get; set; }
public Boolean allowUserCreation { get; set; }
public Permission(Dictionary<String, Object> json)
{
this.ID = int.Parse(json["permissionID"].ToString());
this.name = json["name"].ToString();
this.allowCreateID = (bool) json["allowCreateID"];
this.allowDestroyID = (bool) json["allowDestroyID"];
this.allowConfigAlarm = (bool) json["allowConfigAlarm"];
this.allowUserCreation = (bool)json["allowUserCreation"];
}
public override String ToString()
{
return "[" +
this.ID + "-" +
this.name + "-" +
this.allowCreateID + "-" +
this.allowDestroyID + "-" +
this.allowConfigAlarm + "-" +
this.allowUserCreation + "]";
}
}
}