songjun
2024-09-04 cc908053e0b5075fbfd27350b6da4b39bca9e550
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
using sbcLabSystem.Data.Domain.Account;
using System;
 
namespace sbcLabSystem.Models.Backstage
{
    public class UserRequestInfoModel
    {
        public int Id { get; set; }
        public bool IsSelected { get; set; }
        public string CompanyName { get; set; }
        public string LabName { get; set; }
        public string Address { get; set; }
        public string Province { get; set; }
        public string City { get; set; }
        public string District { get; set; }
        public string PostCode { get; set; }
        public string ManagerName { get; set; }
        public string ManagerPhone { get; set; }
        public string ManagerFax { get; set; }
        public string ManagerMobile { get; set; }
        public string ManagerEmail { get; set; }
        public string OperatorName { get; set; }
        public string OperatorPhone { get; set; }
        public string OperatorFax { get; set; }
        public string OperatorMobile { get; set; }
        public string OperatorEmail { get; set; }
        public int ProjectId { get; set; }
        public DateTime RequestTime { get; set; }
        //更新时间
        public DateTime UpdateTime { get; set; }
        //状态
        public int State { get; set; }
        //实验室用户编号
        public string LabCode { get; set; }
        //用户名
        public string LabLoginName { get; set; }
        //实验室密码
        public string LabPassword { get; set; }
        //备注
        public string Remarks { get; set; }
        public string taxNo { get; set; }
        public static UserRequestInfoModel FromEntity(UserRequestInfo entity)
        {
            if (entity == null)
            {
                return new UserRequestInfoModel();
            }
            UserRequestInfoModel viewModel = new UserRequestInfoModel()
            {
                Id = entity.Id,
                CompanyName = entity.CompanyName,
                LabName = entity.LabName,
                Address = entity.Address,
                Province = entity.Province,
                City = entity.City,
                District = entity.District,
                PostCode = entity.PostCode,
                ManagerName = entity.ManagerName,
                ManagerPhone = entity.ManagerPhone,
                ManagerFax = entity.ManagerFax,
                ManagerMobile = entity.ManagerMobile,
                ManagerEmail = entity.ManagerEmail,
                OperatorName = entity.OperatorName,
                OperatorPhone = entity.OperatorPhone,
                OperatorFax = entity.OperatorFax,
                OperatorMobile = entity.OperatorMobile, 
                OperatorEmail = entity.OperatorEmail,
                ProjectId = entity.ProjectId,
                RequestTime = entity.RequestTime,
                UpdateTime = entity.UpdateTime,
                State = entity.State,
                LabCode = entity.LabCode,
                LabLoginName = entity.LabLoginName,
                LabPassword = entity.LabPassword,
                Remarks = entity.Remarks,
                taxNo = entity.taxNo,
            };
            return viewModel;
        }
        public static UserRequestInfo FromEntity(UserRequestInfoModel entity)
        {
            UserRequestInfo viewModel = new UserRequestInfo()
            {
                Id = entity.Id,
                CompanyName = entity.CompanyName,
                LabName = entity.LabName,
                Address = entity.Address,
                Province = entity.Province,
                City = entity.City,
                District = entity.District,
                PostCode = entity.PostCode,
                ManagerName = entity.ManagerName, 
                ManagerPhone = entity.ManagerPhone,
                ManagerFax = entity.ManagerFax,
                ManagerMobile = entity.ManagerMobile,
                ManagerEmail = entity.ManagerEmail,
                OperatorName = entity.OperatorName,
                OperatorPhone = entity.OperatorPhone,
                OperatorFax = entity.OperatorFax,
                OperatorMobile = entity.OperatorMobile,
                OperatorEmail = entity.OperatorEmail,
                ProjectId = entity.ProjectId,
                RequestTime = entity.RequestTime,
                UpdateTime = entity.UpdateTime,
                State = entity.State,
                LabCode = entity.LabCode,
                LabLoginName = entity.LabLoginName,
                LabPassword = entity.LabPassword,
                Remarks = entity.Remarks,
                taxNo = entity.taxNo,
            };
            return viewModel;
        }
    }
}