/// <summary> /// Full Constructor /// </summary> /// <param name="projectCustomAttribute"></param> public ProjectCustomAttributeSimple(IProjectCustomAttribute projectCustomAttribute) { ProjectCustomAttributeTypeID = projectCustomAttribute.ProjectCustomAttributeTypeID; ProjectCustomAttributeGroupID = projectCustomAttribute.ProjectCustomAttributeType.ProjectCustomAttributeGroupID; ProjectCustomAttributeValues = projectCustomAttribute.GetCustomAttributeValues() .Select(y => y.GetIProjectCustomAttribute().ProjectCustomAttributeType.ProjectCustomAttributeDataType == ProjectCustomAttributeDataType.DateTime ? DateTime.Parse(y.AttributeValue).ToShortDateString() : y.AttributeValue) .ToList(); }
public ProjectCustomAttributeSimple(IProjectCustomAttribute projectCustomAttribute) { ProjectCustomAttributeTypeID = projectCustomAttribute.ProjectCustomAttributeTypeID; ProjectCustomAttributeDataTypeID = projectCustomAttribute.ProjectCustomAttributeType.ProjectCustomAttributeDataTypeID; ProjectCustomAttributeValues = projectCustomAttribute.Values .Select(y => y.IProjectCustomAttribute.ProjectCustomAttributeType.ProjectCustomAttributeDataType == ProjectCustomAttributeDataType.DateTime ? DateTime.Parse(y.AttributeValue).ToShortDateString() : y.AttributeValue) .ToList(); if (ProjectCustomAttributeDataTypeID == ProjectCustomAttributeDataType.DateTime.ProjectCustomAttributeDataTypeID) { ProjectCustomAttributeValueDisplayString = ProjectAttributes.StringToDateStringStatic(projectCustomAttribute.Values.Single().AttributeValue); } else { ProjectCustomAttributeValueDisplayString = string.Join(", ", projectCustomAttribute.Values.Select(x => x.AttributeValue).OrderBy(x => x)); } }
public void SetIProjectCustomAttribute(IProjectCustomAttribute value) => ProjectCustomAttributeUpdate = (ProjectCustomAttributeUpdate)value;