public static void Merge(this T_E_ExternalProject iEntity, ExternalProject iObj) { iEntity.DateObjectiveEnd = iObj.DateObjectiveEnd; iEntity.Description = iObj.Description; iEntity.ExternalProjectId = iObj.ExternalProjectId; iEntity.IsProcessed = iObj.IsProcessed; iEntity.Pilote = iObj.Pilote; iEntity.Priority = iObj.Priority; iEntity.ProjectName = iObj.ProjectName; iEntity.ProjectNumber = iObj.ProjectNumber; iEntity.StatusRef = (short)iObj.Status; iEntity.TypeRef = (short)iObj.Type; iEntity.BEImpacted = iObj.BEImpacted; }
private void UpdatexternalProject(ExternalProject iExternalProject) { if (iExternalProject == null) { throw new Exception("Le projet externe est null"); } if (iExternalProject.ExternalProjectId < 1) { throw new Exception("L'id du projet externe est invalide"); } var newEntity = new T_E_ExternalProject(); newEntity.Merge(iExternalProject); DBReleaseDataService.UpdateExternalProject(newEntity); }
private long AddExternalProject(ExternalProject iExternalProject) { if (iExternalProject == null) { throw new Exception("Le projet externe est null"); } if (iExternalProject.ExternalProjectId != -1) { throw new Exception("L'id du projet externe est invalide"); } var newEntity = new T_E_ExternalProject(); newEntity.Merge(iExternalProject); return(DBReleaseDataService.AddExternalProject(newEntity)); }
public static ExternalProject Convert(this T_E_ExternalProject iEntity) { if (iEntity == null) { return(null); } return(new ExternalProject { DateObjectiveEnd = iEntity.DateObjectiveEnd, Description = iEntity.Description, ExternalProjectId = iEntity.ExternalProjectId, IsProcessed = iEntity.IsProcessed, Pilote = iEntity.Pilote, Priority = iEntity.Priority, ProjectName = iEntity.ProjectName, ProjectNumber = iEntity.ProjectNumber, Status = (ExternalProjectStatusEnum)iEntity.StatusRef, Type = (ExternalProjectTypeEnum)iEntity.TypeRef, BEImpacted = iEntity.BEImpacted }); }