Example #1
0
        public ProductOwnerDTO GetById(int Id)
        {
            ProductOwnerDTO retour = new ProductOwnerDTO();
            ProductOwner    objet  = _repo.Get(Id);

            retour = MapProductOwnerDTO.ToDto(objet);
            return(retour);
        }
Example #2
0
        public List <ProductOwnerDTO> ListActive()
        {
            List <ProductOwnerDTO> retour = new List <ProductOwnerDTO>();
            List <ProductOwner>    liste  = _repo.GetAllActive();

            retour = MapProductOwnerDTO.ToDto(liste);
            return(retour);
        }
Example #3
0
        public ProductOwnerDTO Update(ProductOwnerDTO objet)
        {
            ProductOwner    entite   = MapProductOwner.ToEntity(objet, false);
            ProductOwner    resultat = _repo.Update(entite);
            ProductOwnerDTO retour   = MapProductOwnerDTO.ToDto(resultat);

            return(retour);
        }
Example #4
0
        internal static List <ProjectDTO> ToDto(List <TheMapToScrum.Back.DAL.Entities.Project> liste)
        {
            List <ProjectDTO> retour = new List <ProjectDTO>();

            retour = liste.Select(x => new ProjectDTO()
            {
                Id               = x.Id,
                DepartmentId     = x.DepartmentId,
                ProductOwnerId   = x.ProductOwnerId,
                TeamId           = x.TeamId,
                ScrumMasterId    = x.ScrumMasterId,
                Department       = MapDepartmentDTO.ToDto(x.Department),
                ProductOwner     = MapProductOwnerDTO.ToDto(x.ProductOwner),
                ScrumMaster      = MapScrumMasterDTO.ToDto(x.TechnicalManager),
                Team             = MapTeamDTO.ToDto(x.Team),
                DateCreation     = (System.DateTime)x.DateCreation,
                DateModification = (System.DateTime)x.DateModification,
                IsDeleted        = x.IsDeleted,
                Label            = x.Label
            }).ToList();
            return(retour);
        }
Example #5
0
        internal static ProjectDTO ToDto(Project objet)
        {
            ProjectDTO retour = new ProjectDTO();

            if (null != objet)
            {
                retour.Id               = objet.Id;
                retour.Label            = objet.Label;
                retour.ProductOwnerId   = objet.ProductOwnerId;
                retour.TeamId           = objet.TeamId;
                retour.ScrumMasterId    = objet.ScrumMasterId;
                retour.DepartmentId     = objet.DepartmentId;
                retour.Department       = MapDepartmentDTO.ToDto(objet.Department);
                retour.ScrumMaster      = MapScrumMasterDTO.ToDto(objet.TechnicalManager);
                retour.ProductOwner     = MapProductOwnerDTO.ToDto(objet.ProductOwner);
                retour.Team             = MapTeamDTO.ToDto(objet.Team);
                retour.DateCreation     = (System.DateTime)objet.DateCreation;
                retour.DateModification = (System.DateTime)objet.DateModification;
                retour.IsDeleted        = objet.IsDeleted;
            }
            return(retour);
        }