コード例 #1
0
        private ApprovalInfoPO ApprovalInfoPOFromDO(ApprovalInfo approvalInfo, string aplicantId = null, string leaveID = null)
        {
            var approvalInfoPO = new ApprovalInfoPO()
            {
                ApplicantId    = aplicantId,
                LeaveId        = leaveID,
                ApprovalType   = approvalInfo.ApprovalType,
                ApproverId     = approvalInfo.Approver.PersonId,
                ApproverLevel  = approvalInfo.ApproverLevel,
                ApproverName   = approvalInfo.Approver.PersonName,
                ApprovalInfoId = string.IsNullOrEmpty(approvalInfo.ApprovalInfoId) ? Guid.NewGuid().ToString() : approvalInfo.ApprovalInfoId,
                Msg            = approvalInfo.Msg,
                Time           = approvalInfo.Time
            };

            return(approvalInfoPO);
        }
コード例 #2
0
        private ApprovalInfo ApprovalInfoFromPO(ApprovalInfoPO approvalInfoPO)
        {
            var approvalInfo = new ApprovalInfo();

            approvalInfo.ApprovalInfoId = approvalInfoPO.ApprovalInfoId;
            var approver = new Approver()
            {
                PersonId   = approvalInfoPO.ApproverId,
                PersonName = approvalInfoPO.ApproverName,
                Level      = approvalInfoPO.ApproverLevel
            };

            approvalInfo.Approver = approver;
            approvalInfo.Msg      = approvalInfoPO.Msg;
            approvalInfo.Time     = approvalInfoPO.Time;
            return(approvalInfo);
        }