public static FormFieldValueViewModel CreateFromObject(FormFieldValue model)
 {
     model.FormFieldReference.Load();
     return new FormFieldValueViewModel
     {
         Id = model.ID,
         FieldId = model.FieldId,
         EntryId = model.EntryId.ToString(),
         Value = model.Value,
         DateAdded = model.DateAdded,
         FieldType = (Constants.FieldType)Enum.Parse(typeof(Constants.FieldType), model.FormField.FieldType),
         FieldLabel = model.FormField.Label,
         FieldOrder = model.FormField.Order.Value
     };
 }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the FormFieldValues EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFormFieldValues(FormFieldValue formFieldValue)
 {
     base.AddObject("FormFieldValues", formFieldValue);
 }
Example #3
0
 /// <summary>
 /// Create a new FormFieldValue object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="fieldId">Initial value of the FieldId property.</param>
 /// <param name="entryId">Initial value of the EntryId property.</param>
 /// <param name="dateAdded">Initial value of the DateAdded property.</param>
 public static FormFieldValue CreateFormFieldValue(global::System.Int32 id, global::System.Int32 fieldId, global::System.Guid entryId, global::System.DateTime dateAdded)
 {
     FormFieldValue formFieldValue = new FormFieldValue();
     formFieldValue.ID = id;
     formFieldValue.FieldId = fieldId;
     formFieldValue.EntryId = entryId;
     formFieldValue.DateAdded = dateAdded;
     return formFieldValue;
 }