/// <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();
 }
Exemple #2
0
 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));
     }
 }
Exemple #3
0
 public void SetIProjectCustomAttribute(IProjectCustomAttribute value) =>
 ProjectCustomAttributeUpdate = (ProjectCustomAttributeUpdate)value;