コード例 #1
0
ファイル: CoreMapper.cs プロジェクト: betrandcheam/eHR
        public static PMS.Model.DTO.Core.Security.UserRole MapUserRoleEntityToDTO(PMS.Model.Context.USER_ROLE entity)
        {
            PMS.Model.DTO.Core.Security.UserRole obj_dto = new DTO.Core.Security.UserRole()
            {
                Id          = entity.ID,
                RoleId      = entity.MST_ROLE.ID,
                Name        = entity.MST_ROLE.NAME,
                Code        = entity.MST_ROLE.CODE,
                Description = entity.MST_ROLE.DESCRIPTION,
                Active      = entity.MST_ROLE.ACTIVE
            };

            obj_dto.User = MapEmployeeEntityToUserDTO(entity.EMPLOYEE, false);

            return(obj_dto);
        }
コード例 #2
0
ファイル: CoreMapper.cs プロジェクト: kyoliumiao/eHR-Phase2
        public static PMS.Model.DTO.Core.Security.UserRole MapUserRoleEntityToDTO(PMS.Model.Context.USER_ROLE entity)
        {
            PMS.Model.DTO.Core.Security.UserRole obj_dto = new DTO.Core.Security.UserRole()
            {
                Id = entity.ID,
                RoleId = entity.MST_ROLE.ID,
                Name = entity.MST_ROLE.NAME,
                Code = entity.MST_ROLE.CODE,
                Description = entity.MST_ROLE.DESCRIPTION,
                Active = entity.MST_ROLE.ACTIVE
            };

            obj_dto.User = MapEmployeeEntityToUserDTO(entity.EMPLOYEE, false);

            return obj_dto;
        }