public JSONRCCountryRecord(RCCountryRecord s, IBehaviorsConfiguration config)
 {
     if (config.DefaultValuesBehavior == DefaultValuesBehavior.DontSend)
     {
         AttrCountry = ssAddress_CS.RestRecords.JSONENCountryEntityRecord.FromStructure(s.ssENCountry, config);
     }
     else
     {
         AttrCountry = ssAddress_CS.RestRecords.JSONENCountryEntityRecord.FromStructure(s.ssENCountry, config);
     }
 }
Ejemplo n.º 2
0
        public static ENCountryEntityRecord ToStructure(ssAddress_CS.RestRecords.JSONENCountryEntityRecord obj, IBehaviorsConfiguration config)
        {
            ENCountryEntityRecord s = new ENCountryEntityRecord(null);

            if (obj != null)
            {
                s.ssId              = obj.AttrId == null ? 0L: obj.AttrId.Value;
                s.ssISO             = obj.AttrISO == null ? "": obj.AttrISO;
                s.ssName            = obj.AttrName == null ? "": obj.AttrName;
                s.ssActive          = obj.AttrActive == null ? true: obj.AttrActive.Value;
                s.ssCreatedDate     = obj.AttrCreatedDate == null ? new DateTime(1900, 1, 1, 0, 0, 0): OutSystems.RESTService.Conversions.TextToDateTime(obj.AttrCreatedDate, config.DateTimeFormat);
                s.ssCreatedBy       = obj.AttrCreatedBy == null ? 0: obj.AttrCreatedBy.Value;
                s.ssLastUpdatedDate = obj.AttrLastUpdatedDate == null ? new DateTime(1900, 1, 1, 0, 0, 0): OutSystems.RESTService.Conversions.TextToDateTime(obj.AttrLastUpdatedDate, config.DateTimeFormat);
                s.ssLastUpdatedBy   = obj.AttrLastUpdatedBy == null ? 0: obj.AttrLastUpdatedBy.Value;
            }
            return(s);
        }