C3204
2025-12-24 9ff4fd341f28664f8a5a67137a7be4b8e21f11ec
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace LB_SmartVisionCommon
{
    /// <summary>
    /// 记录用户信息数据
    /// </summary>
    [JsonObject(MemberSerialization.OptOut)]
    [TypeConverter(typeof(PropertySorter))]
    public class RecordUserData
    {
        /// <summary>
        /// 员工编号
        /// </summary>
        [Category("RecordUserData"), PropertyOrder(1)]
        [DisplayName("员工号")]
        [Browsable(true)]
        public string EmployeeNumber { get; set; }
        /// <summary>
        /// 员工名称
        /// </summary>
        [Category("RecordUserData"), PropertyOrder(2)]
        [DisplayName("姓名")]
        [Browsable(true)]
        public string EmployeeName { get; set; }
        /// <summary>
        /// 员工账号
        /// </summary>
        [Category("RecordUserData"), PropertyOrder(3)]
        [DisplayName("账号")]
        [Browsable(true)]
        public string EmployeeAccount { get; set; }
        /// <summary>
        /// 员工密码
        /// </summary>
        [Browsable(false)]
        public string EmployeePassword { get; set; }
        /// <summary>
        /// 员工权限
        /// </summary>
        [Category("RecordUserData"), PropertyOrder(5)]
        [DisplayName("权限")]
        [Browsable(true)]
        public UserPermission EmployeePermission { get; set; } = UserPermission.Operator;
 
        /// <summary>
        /// 复制用户数据
        /// </summary>
        public RecordUserData Clone()
        {
            return new RecordUserData
            {
                EmployeeNumber = this.EmployeeNumber,
                EmployeeName = this.EmployeeName,
                EmployeeAccount = this.EmployeeAccount,
                EmployeePassword = this.EmployeePassword,
                EmployeePermission = this.EmployeePermission
            };
        }
    }
    /// <summary>
    /// UserPermission
    /// </summary>
    public enum UserPermission
    {
        /// <summary>
        /// UserPermission:Operator
        /// </summary>
        Operator,
        /// <summary>
        /// UserPermission:Engineer
        /// </summary>
        Engineer,
        /// <summary>
        /// UserPermission:Administrator
        /// </summary>
        Administrator
    }
}