public FieldObject TransformToFieldObject(CustomFieldObject customFieldObject) { var fieldObject = new FieldObject(); fieldObject.FieldNumber = customFieldObject.FieldNumber; fieldObject.FieldValue = customFieldObject.FieldValue; fieldObject.Enabled = ((int)customFieldObject.EnabledStatus).ToString(); fieldObject.Lock = ((int)customFieldObject.LockedStatus).ToString(); fieldObject.Required = ((int)customFieldObject.RequiredStatus).ToString(); return fieldObject; }
private FieldObject MockBasicFieldObject() { var fieldObject = new FieldObject(); fieldObject.Enabled = "1"; fieldObject.FieldNumber = "0"; fieldObject.FieldValue = "1"; fieldObject.Lock = "1"; fieldObject.Required = "0"; return fieldObject; }
public CustomFieldObject TransformToCustomFieldObject(FieldObject fieldObject) { var customFieldObject = new CustomFieldObject(); customFieldObject.FieldNumber = fieldObject.FieldNumber; customFieldObject.FieldValue = fieldObject.FieldValue; customFieldObject.EnabledStatus = ConvertToEnabledStatusEnum(fieldObject.Enabled); customFieldObject.LockedStatus = ConvertToLockedStatusEnum(fieldObject.Lock); customFieldObject.RequiredStatus = ConvertToRequiredStatusEnum(fieldObject.Required); return customFieldObject; }
protected virtual CustomFieldObject TransformField(FieldObject field) { return new FieldObjectTransform().TransformToCustomFieldObject(field); }