예제 #1
0
 public void SetValue(SubmissionFieldBaseValue valueItem)
 {
     if (valueItem != null)
     {
         if (valueItem is SubmissionFieldStringValue)
         {
             Value = new dtoValueField(((SubmissionFieldStringValue)valueItem).Value, ((SubmissionFieldStringValue)valueItem).UserValue);
         }
         else if (valueItem is SubmissionFieldFileValue)
         {
             SubmissionFieldFileValue fileValue = (SubmissionFieldFileValue)valueItem;
             Value = new dtoValueField(fileValue.Link);
         }
         IdValueField = valueItem.Id;
     }
 }
예제 #2
0
 public dtoSubmissionValueField(FieldDefinition definition, SubmissionFieldBaseValue valueItem, long revNumber)
     : this(definition)
 {
     if (valueItem != null)
     {
         if (valueItem is SubmissionFieldStringValue)
         {
             Value = new dtoValueField(((SubmissionFieldStringValue)valueItem).Value, ((SubmissionFieldStringValue)valueItem).UserValue);
         }
         else if (valueItem is SubmissionFieldFileValue)
         {
             SubmissionFieldFileValue fileValue = (SubmissionFieldFileValue)valueItem;
             Value = new dtoValueField(fileValue.Link);
         }
         IdValueField = valueItem.Id;
     }
     RevisionsCount = revNumber;
     //else if (Mandatory)
     //    FieldError = FieldError.Mandatory;
 }