public FormObject TransformToFormObject(CustomFormObject customFormObject) { var formObject = new FormObject(); formObject.FormId = customFormObject.FormId; formObject.CurrentRow = customFormObject.CurrentRow == null ? null : TransformCustomRow(customFormObject.CurrentRow); formObject.OtherRows = customFormObject.OtherRows.Any() ? TransformCustomRows(customFormObject.OtherRows) : new List<RowObject>(); return formObject; }
public CustomFormObject TransformToCustomFormObject(FormObject formObject) { var CustomFormObject = new CustomFormObject(); CustomFormObject.FormId = formObject.FormId; var tempRows = MergeRows(formObject.CurrentRow, formObject.OtherRows); CustomFormObject.Rows = TransformRows(tempRows); return CustomFormObject; }
protected virtual CustomFormObject TransformForm(FormObject form) { return new FormObjectTransform().TransformToCustomFormObject(form); }
private void AddRowObjects(FormObject formObject, int NumberOfRows) { for (int i = 0; i < NumberOfRows; i++) { if (i == 0) InitCurrentRow(formObject); else formObject.OtherRows.Add(CreateRowObject()); } }
private FormObject MockBasicFormObject() { var formObject = new FormObject(); formObject.FormId = "1"; formObject.MultipleIteration = false; return formObject; }
private void InitCurrentRow(FormObject formObject) { formObject.CurrentRow = new RowObject(); }